Preparing your workspace
Semantic HTML uses elements according to their meaning instead of using generic elements for everything.
Semantic elements describe the purpose of content. For example, nav represents navigation links, main represents the main content of the page, article represents a self-contained piece of content, and footer represents footer information. Generic elements such as div and span are still useful, but they should not replace semantic elements when a meaningful element exists. Semantic HTML improves accessibility because assistive technologies can understand page regions more clearly. It also helps developers understand the code and can help search engines understand page structure.
A news website can use header for the site header, nav for navigation, main for the primary content, article for each story, aside for related content, and footer for site information.
<header>
<h1>Tech Daily</h1>
</header>
<nav>
<a href="/news">News</a>
<a href="/tutorials">Tutorials</a>
</nav>
<main>
<article>
<h2>Learning HTML</h2>
<p>HTML provides structure and meaning.</p>
</article>
</main>
<footer>
<p>Copyright 2026 Tech Daily</p>
</footer>The page is divided into meaningful structural regions that represent the header, navigation, main content, article, and footer.