Semantic HTML5 Layout: header, nav, main, section, article, aside, footer and Heading Structure for Real Pages
Why Semantic Tags?
Before HTML5 most pages were full of div tags with class names like header or menu. A browser could not tell what they meant. Semantic tags say what each part is. This helps screen readers, search engines and other developers.
| Tag | Use it for |
|---|---|
header | Intro area of the page or of a section: logo, title, nav |
nav | A group of main navigation links |
main | The main unique content. Use one per page |
section | A themed group of content that usually has a heading |
article | Content that makes sense alone: a post, news story or product card |
aside | Related side content, such as tips or ads |
footer | Closing info: copyright, contact, links |
address | Contact details for the page or article author |
figure | An image, chart or code with a caption |
A Complete Page Skeleton
html
<body>
<a class="skip" href="#content">Skip to content</a>
<header>
<a href="/" class="logo">Fresh Bites</a>
<nav aria-label="Main">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/recipes">Recipes</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</nav>
</header>
<main id="content">
<h1>Easy Weeknight Recipes</h1>
<section aria-labelledby="latest">
<h2 id="latest">Latest Recipes</h2>
<article>
<h3>Vegetable Pulao</h3>
<p>Ready in 30 minutes.</p>
</article>
<article>
<h3>Lemon Rice</h3>
<p>A bright, simple lunch.</p>
</article>
</section>
<aside>
<h2>Cooking Tip</h2>
<p>Salt the water for rice.</p>
</aside>
</main>
<footer>
<p>© 2026 Fresh Bites</p>
</footer>
</body>
Section or Article or Div?
- Could this content stand alone in a feed or list? Use
article - Is it a themed group that deserves a heading? Use
section - Is it only for styling or layout? Use
div - Is it a piece of text inside a line? Use
span
Landmarks Screen reader users jump between landmarks such as
nav, main and footer. Good semantic tags give them a map of the page. If a page has more than one nav, label each with aria-label.
Heading Structure
- One
h1that names the page - Use
h2for main sections andh3for parts inside them - Do not skip from
h2toh5just for size
Practice
- Rewrite a page made of
divtags using semantic tags - Add a skip link and test it with the Tab key
- Draw the page outline from its headings
Conclusion
Semantic tags describe what content is. Use header, nav, main, section, article, aside and footer, with a clear heading order.
Quick Summary: Why semantic; tag list; page skeleton; choosing tags; headings.

