Examples of semantic elements?

Common semantic elements include landmarks (<header>, <nav>, <main>, <aside>, <footer>, <search>), content sections (<article>, <section>, <figure>, <figcaption>), text-level meaning (<strong>, <em>, <mark>, <time>, <abbr>, <code>, <blockquote>, <cite>), interactive elements (<button>, <a>, <details>, <summary>, <dialog>) and forms (<form>, <label>, <fieldset>, <legend>, <output>).

Landmarks

  • <header>: introductory content for the page or a section.
  • <nav>: major navigation blocks.
  • <main>: the dominant content of the page.
  • <aside>: tangential content such as sidebars and callouts.
  • <footer>: footer for the page or a section.
  • <search>: wraps a search form; Baseline since 2023 and widely available since April 2026.

Sectioning content

  • <article>: self-contained, could be syndicated (blog post, comment, product card).
  • <section>: a thematic grouping with a heading.
  • <figure> and <figcaption>: images, charts or code with a caption.

Text-level semantics

  • <strong> (importance), <em> (stress emphasis), <mark> (highlight).
  • <time datetime="2026-11-21"> machine-readable dates.
  • <abbr title="Cascading Style Sheets">CSS</abbr>.
  • <code>, <kbd>, <samp>, <pre> for code and keyboard input.
  • <blockquote cite>, <q>, <cite> for quotations.
  • <address> for contact information.

Interactive

<button>, <a href>, <details>/<summary>, <dialog>, <menu>.

Forms

<label>, <fieldset>/<legend>, <output>, <meter>, <progress>, <datalist>.

Code example

html
1<style>body { font-family: system-ui; } figure { margin: 0; } mark { background: #fde68a; }</style>
2<search>
3 <form role="search"><label>Search <input type="search" name="q"></label></form>
4</search>
5<article>
6 <header><h2>Release notes</h2><p>Updated <time datetime="2026-11-21">today</time></p></header>
7 <p>The <abbr title="HyperText Markup Language">HTML</abbr> spec is a <mark>living standard</mark>.</p>
8 <p>Press <kbd>Ctrl</kbd> + <kbd>K</kbd> to search. Run <code>npm run dev</code>.</p>
9 <blockquote cite="https://html.spec.whatwg.org/">
10 <p>HTML is the World Wide Web's core markup language.</p>
11 </blockquote>
12 <figure>
13 <img src="https://picsum.photos/240/100" alt="Chart of browser support" width="240" height="100">
14 <figcaption>Figure 1: support over time</figcaption>
15 </figure>
16 <details><summary>Changelog</summary><p>Added popover support.</p></details>
17 <p>Storage used: <meter value="0.7">70%</meter></p>
18 <footer><address>Contact: <a href="mailto:team@example.com">team@example.com</a></address></footer>
19</article>

Practice this question

Open it in the study app to track progress, take notes, listen to the answer and work through the rest of the HTML & CSS set.

Open in study app