HTMLHTML · Lesson 11

Semantic HTML

header, nav, main, section, article, aside, footer.

Video tutorialTrack course · freeCodeCamp
Speed
Next lesson
Watch 00:00 · 1 checkpoints Watch on YouTube More on this topic
Transcript & captions
5/5

Semantic elements describe what a region of a page is, instead of using a wall of <div>s. Search engines and screen readers both rely on them.

htmlhtml
<body>
  <header><nav>...</nav></header>
  <main>
    <article>
      <h1>Post title</h1>
      <section>...</section>
    </article>
    <aside>Related links</aside>
  </main>
  <footer>© 2026</footer>
</body>

There should be exactly one <main> per page, and it should not sit inside a header, footer, nav or article.

Knowledge check

0/1 answered

Which element wraps the primary unique content of a page?