NEW
Font size
Worksheetsweb developement
Total questions: 30
Worksheet time: 10mins
which HTML tag is used to define interactive controls for forms?
<input>
<button>
<form>
<select>
which CSS properly is used to make text bold?
text decoration
font weight
font style
font size
Which of the following correctly selects all <p> elements inside a <div> in CSS?
div p
div.p
p div
div+p
In JavaScript, which keyword is used to declare a variable that cannot be reassigned?
var
let
const
static
What will typeof null return in JavaScript?
"null"
"undefined"
"object"
"string"
Which function converts a JSON string into an object in JavaScript?
JSON.parse()
JSON.stringify
parseJSON()
convertJSON()
What is the default value of the display property for a <div>?
inline
inline-block
block
flex
What does the useState hook return in React?
only the current state
only the function to update the state
A pair: current state and update function
a class based state object
In React, what is the purpose of the key prop in lists?
to style elements uniquely
to identify which items changed
to improve rendering speed
to bind event listeners
Which of the following is NOT a JavaScript data type?
boolean
undefined
char
symbol
Which CSS property controls the stacking order of elements?
order
z-index
index
stack
What is a closure in JavaScript?
A function inside another function that remembers outer variables
A function that runs once
A variable declared globally
A loop that terminates
13. What does == do differently from === in JavaScript?
Compares values and types
Compares only values
Compares only types
Compares object references
14. Which HTTP method is idempotent and used to replace an entire resource?
POST
PUT
PATCH
GET
What does CORS stand for?
Centralized Origin Resource System
Cross-Origin Resource Sharing
Client-Origin Resource Security
Common-Origin Request Setup
What is the virtual DOM in React?
A real DOM copy stored in the server
A lightweight representation of the real DOM
A database
A debugging tool
Which CSS unit is relative to the root element’s font size?
em
rem
px
%
Which statement is true about async and await?
await can be used outside async functions
They make asynchronous code look synchronous
They replace promises
They block the event loop
What does JSX stand for in React?
JavaScript XML
Java Syntax Extension
JSON Syntax Extension
JavaScript Extension
What is the purpose of npm?
Node Processing Manager
Node Package Manager
Network Project Module
Node Program Maker
What is the correct way to make a checkbox pre-selected on page load?
<input type="checkbox" selected>
<input type="checkbox" check>
<input type="checkbox" checked>
<input type="checkbox" default>
Which tag is used to embed a JavaScript file in HTML?
<script href="file.js">
<script src="file.js"></script>
<javascript src="file.js">
<link src="file.js">
Which HTML5 tag is used to draw graphics on the web page?
<graphics>
<canvas>
<draw>
<paint>
What is the correct HTML element for playing audio files?
<music>
<audio>
<sound>
<media>
What is the output?
console.log(0.1 + 0.2 === 0.3);
true
false
NaN
UNDEFINED
27. What is the output?
console.log([] + []);
[]
"" (empty string)
0
undefined
28. What does this return?
[] == ![];
true
false
undefined
error
26. What will happen?
console.log(a);
let a = 10;
10
undefined
ReferenceError
null
Which layout module is one-dimensional?
CSS Grid
Flexbox
Table
Float
Which of these defines a CSS variable correctly?
var-color: red;
$color: red;
--color: red;
@color: red;
