NEW
Font size
WorksheetsFrontend Assignment
Total questions: 20
Worksheet time: 7mins
What is the default value of the "display" property in CSS for an HTML element?
A. Inline
B. Table
C. Block
D. None
What is the difference between the "id" and "class" attributes in HTML?
A. . There is no difference
B. "id" is used to identify a unique element, while "class" is used to group multiple elements
C. "class" is used to identify a unique element, while "id" is used to group multiple elements
D. "id" and "class" are used interchangeably to identify elements
Which of the following HTML tags is used to create a list with bullet points?
a. <ul>
b. <li>
c. <ol>
d. <dl>
Which of the following HTML tags is used to create a hyperlink?
A. <img>
B. <p>
C. <h1>
D. <a>
What is the purpose of the alt attribute in the <img> tag?
A) To add a caption to an image
B) To specify the dimensions of an image
C) To provide alternative text for an image if it cannot be displayed
D) To add a hyperlink to an image
What is the difference between padding and margin in CSS?
A) Padding and margin are only used for text elements.
B) Padding is the space outside an element, while margin is the space inside an element.
C) Padding and margin both refer to the same thing.
D)Padding is the space inside an element, while margin is the space outside an element.
What is the difference between inline and block elements in CSS?
A) Inline elements are displayed on their own line, while block elements are displayed inline with other elements.
B) Inline elements are displayed inline with other elements, while block elements are displayed on their own line.
C) Inline elements and block elements are the same thing.
D) Inline elements are only used for text elements, while block elements are used for all other elements.
Which of the following CSS properties is used to create a gradient background?
A) background-color
B) background-image
C) background-gradient
D) background-style
Which of the following CSS properties is used to create a transition effect?
A) transition
B) transform
C) animation
D) filter
What is the purpose of the flexbox layout in CSS?
A) To create a grid layout.
B) To create a column layout.
C) To create a row layout.
D) To create a responsive layout that can adapt to different screen sizes.
What is the purpose of the Array.isArray() method in JavaScript?
A) To check if a variable is an array.
B) To check if a variable is an object.
C) To check if a variable is null.
D) To check if a variable is undefined.
What is the purpose of the if statement in JavaScript?
A) To declare a function.
B) To assign a value to a variable.
C) To perform a conditional operation.
D) To loop through a set of data.
What is the output of the following code?
var x = 5; console.log(x++);
A) 6
B) 5
C) "5+1"
D) NaN
What is the output of the following code?
console.log(typeof typeof 1);
A) "string"
B) "number"
C) "object"
D) "undefined"
What is the output of the following code?
console.log(2 + 2 + "2");
A) "22"
B) "42"
C) 6
D) NaN
What is the syntax for selecting an element with a specific ID using jQuery?
A) $(element)
B) $(class)
C) $(#id)
D) $(ID)
Which jQuery method is used to retrieve the HTML contents of an element?
A) get()
B) html()
C) text()
D) val()
What is the syntax for creating a new element using jQuery?
A) $(element)
B) $(HTML)
C) $(selector)
D) $(text)
Which jQuery method is used to animate an element?
A) fade()
B) slide()
C) animate()
D) transform()
What is the purpose of the .each() function in jQuery?
A) To iterate over a collection of elements
B) To add a CSS class to an element
C) To check if an element exists in the DOM
D) To animate an element on a page
