Semantic HTML and Page Structure: header, nav, main, section, article, aside, footer and Accessible Landmarks
What Does Semantic Mean?
Semantic tags describe what content is, not only how it looks. Compare <div class="top"> with <header>. The second tells everyone, including machines, that it is the page header.
Page Skeleton
html
<body>
<header>
<a href="/" class="logo">Sunrise Bakery</a>
<nav aria-label="Main">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/cakes.html">Cakes</a></li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</nav>
</header>
<main>
<h1>Fresh cakes for every celebration</h1>
<section aria-labelledby="menu-title">
<h2 id="menu-title">Our cakes</h2>
<article>
<h3>Chocolate truffle</h3>
<p>Rich and soft with dark chocolate.</p>
</article>
</section>
<aside>
<h2>Opening hours</h2>
<p>Every day, 8 am to 9 pm.</p>
</aside>
</main>
<footer>
<p>Sunrise Bakery, Pune. Call us on 0123 456 7890.</p>
</footer>
</body>
Tag Guide
| Tag | Use for |
|---|---|
<header> | Intro area of the page or a section: logo, title, nav |
<nav> | Main groups of navigation links |
<main> | The unique main content. Only one per page |
<section> | A themed group of content, usually with a heading |
<article> | Content that makes sense on its own: post, product card, comment |
<aside> | Side information related to the main content |
<footer> | Closing info: contact, copyright, links |
<figure> and <figcaption> | An image or diagram with a caption |
<time datetime="2026-12-25"> | A date or time machines can read |
When to Use div and span
div and span have no meaning. Use them when no semantic tag fits, mainly to group things for styling or scripts.
Why It Matters
- Screen reader users jump between landmarks (header, nav, main, footer)
- Search engines understand the page better
- Code is easier to read and maintain
- Many semantic tags come with free built-in behavior such as the
buttonelement
Use the right element Use
<button> for actions and <a> for navigation. A clickable div needs extra work to be keyboard and screen reader friendly, so avoid it.
Practice
- Rewrite a page that uses only div tags with semantic tags
- Add
aria-labelto two different nav areas - Check your page outline: does it read well with only headings?
Conclusion
Semantic HTML gives meaning to structure. It improves accessibility, SEO and code quality, and it costs nothing extra.
Quick Summary: Meaning; skeleton; tag guide; div and span; benefits.

