What are semantic elements in HTML5? Give examples

Semantic elements are tags whose name tells what the content is. For example <nav> holds navigation links and <footer> is the bottom part of a page. A <div> tells nothing.

  • header, nav, main, footer
  • section, article, aside
  • figure, figcaption, time
<header>Site title</header>
<nav>Menu</nav>
<main>
  <article>Blog post</article>
  <aside>Related links</aside>
</main>
<footer>Copyright</footer>

They help SEO, accessibility and make the code easy to read. See HTML Semantic Elements.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.