
HTML and CSS Quiz
Authored by anurag kalmodiya
Computers
12th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What is the purpose of the
To group together HTML elements and apply styles or scripts to them as a single unit
To create a hyperlink
To display an image
To define a paragraph
2.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
Explain the difference between the 'id' and 'class' attributes in HTML.
The 'id' attribute is used for scripting purposes, while the 'class' attribute is used for styling.
The 'id' attribute is used to group elements together, while the 'class' attribute is used for unique identification.
The 'id' attribute is used to uniquely identify an element on a page, while the 'class' attribute is used to group elements together for styling and scripting purposes.
The 'id' attribute is used for styling, while the 'class' attribute is used for unique identification.
3.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What is the difference between the 'class' and 'id' selectors in CSS?
The 'class' selector is used to select a single element with a specific class attribute, while the 'id' selector is used to select elements with a specific id attribute.
The 'class' selector is used to select elements with a specific class attribute, while the 'id' selector is used to select a single element with a specific id attribute.
The 'class' selector is used to apply JavaScript functions to elements with a specific class attribute, while the 'id' selector is used to apply JavaScript functions to elements with a specific id attribute.
The 'class' selector is used to style elements with a specific class attribute, while the 'id' selector is used to style elements with a specific id attribute.
4.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
Explain the concept of specificity in CSS.
Specificity in CSS refers to the way the browser decides which styles to apply when there is a conflict.
Specificity in CSS refers to the color scheme used in the styles
Specificity in CSS refers to the number of elements on the webpage
Specificity in CSS refers to the type of font used in the styles
5.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What are the different input types available in HTML forms?
text, password, radio, checkbox, submit, reset, file, hidden, date, color, email, number, range, tel, url, and more
text, password, radio, checkbox, submit, reset, file, hidden, date, color, email, number, range, tel, url, and never
text, password, radio, checkbox, submit, reset, file, hidden, date, color, email, number, range, tel, url, and less
text, password, radio, checkbox, submit, reset, file, hidden, date, color, email, number, range, tel, url, and always
6.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
How can you center an element horizontally using CSS?
margin: 0 auto;
padding: 0 auto;
text-align: center;
float: center;
7.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What are the semantic elements introduced in HTML5?





%20(1).png)