HTML Intermediate Quiz

Test your knowledge of HTML and CSS fundamentals

Time Left: 3:00
1. What is the main purpose of the HTML <section> element?
Correct Answer: To group related content semantically
Explanation: The <section> element groups related content with a common theme and adds semantic meaning.
2. True or False: The <div> element has semantic meaning in HTML.
Correct Answer: False
Explanation: The <div> element is non-semantic; it's mainly used for layout and styling.
3. Which HTML attribute improves accessibility by providing text for screen readers?
Correct Answer: alt
Explanation: The alt attribute provides alternative text for images, improving accessibility.
4. Which CSS property is used to change text color?
Correct Answer: color
Explanation: The color property changes text color in CSS.
5. True or False: The CSS box model includes margin, border, padding, and content.
Correct Answer: True
Explanation: The box model defines content, padding, border, and margin of an element.
6. Which CSS property is used to create space inside an element?
Correct Answer: padding
Explanation: The padding property adds space between content and border.
7. Which HTML element is best for embedding a YouTube video?
Correct Answer: <iframe>
Explanation: YouTube videos are embedded using <iframe>.
8. True or False: CSS Flexbox is one-dimensional.
Correct Answer: True
Explanation: Flexbox works in a single dimension (row or column). Grid is for two dimensions.
9. Which HTML tag is used to define navigation links?
Correct Answer: nav
Explanation: The <nav> element defines navigation links semantically.
10. Which CSS property controls the stacking order of elements?
Correct Answer: z-index
Explanation: The z-index property controls stacking order of elements.
Back View Result