Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.
Exam details
HTML5 semantic elements provide meaningful structure to web pages. They describe the role of their content rather than just its appearance. Examples include <header>, <nav>, <main>, <article>, <section>, and <footer>. They improve accessibility, SEO, and code readability.
<section> is a semantic element that represents a thematic grouping of content, typically with a heading. <div> is a non-semantic generic container with no inherent meaning. Use <section> when content forms a logical group; use <div> purely for styling or layout purposes.
The <article> element represents a self-contained composition that could be independently distributed or reused. Examples include:
<article> should make sense on its own, even outside the context of the page.
The <nav> element represents a section of a page that contains navigation links, either within the site or to other sites. It is intended for major navigation blocks, not every group of links. Screen readers use it to determine what to skip or jump to directly.
<figure> wraps self-contained content like images, diagrams, or code snippets that are referenced in the main flow. <figcaption> provides a caption or legend for the figure.
Example:<figure><img src="chart.png"><figcaption>Sales data</figcaption></figure>