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,footersection,article,asidefigure,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 |
|---|
| HTML Semantic Elements |
| HTML Responsive Design |
| Exercises & Assignments |
|---|
| Write an HTML program to create a navigation menu |
| Write an HTML program to create a page layout with semantic elements |