Skip to content

Courses / HTML5 Mastery: Complete Beginner to Advanced Course / HTML Semantics

683 people viewed this

HTML Semantics

Which statement is correct?

  1. Semantic HTML automatically guarantees that a website is fully accessible.
  2. Semantic HTML communicates structure and meaning, but other accessibility practices are also necessary.
  3. Semantic HTML is useful only for search engines.
  4. Semantic HTML means CSS cannot be used.

21. Quiz Answer Key and Explanations

Answer 1: B — To communicate the meaning and structure of content

Semantic HTML uses elements whose meanings describe their content or role. This helps developers understand the code and helps browsers and assistive technologies interpret the document structure.

Answer 2: A — nav

The nav element identifies a major navigation region. It is appropriate for primary navigation, a table of contents or other significant groups of navigation links.

Answer 3: C — main

The main element identifies the dominant content of the document body. It helps distinguish the page's primary content from repeated elements such as site navigation and the general footer.

Answer 4: A — article

The article element represents a self-contained composition, such as a blog post, news story or forum contribution. It is suitable when the content makes sense as an independent piece.

Answer 5: B — section

The section element groups related content around a particular topic. A heading is generally recommended to make the purpose of the section clear.

Answer 6: C — When a generic container is needed and no more specific semantic element fits

The div element is a non-semantic container. It remains useful for CSS layout, styling and scripting when a more meaningful element is not appropriate.

Answer 7: A — aside

The aside element represents complementary content or material indirectly related to the surrounding content. Related links, supplementary notes and sidebars are common examples.

Answer 8: B — datetime

The datetime attribute supplies a machine-readable date, time or duration. The visible text can be formatted naturally for readers while the attribute provides a standardized value.

Answer 9: C — To represent relevant contact information for the nearest article or body context

The address element represents contact information associated with the nearest article or body ancestor. It is not a general-purpose element for every postal address or location mentioned on a page.

Answer 10: B — Semantic HTML communicates structure and meaning, but other accessibility practices are also necessary

Semantic HTML provides an important accessibility foundation, but developers must also consider keyboard access, form labels, meaningful links, color contrast, accessible names and correct interaction behavior.

22. Final Revision Checklist

Rate this course

5.0 · 1 rating

Stars show on this course. Your written note stays private.

Your stars