Semantic HTML5 Layout: header, nav, main, section, article, aside, footer and Heading Structure for Real Pages

HTML5 and CSS3 50 min min read Updated: Nov 17, 2026 Beginner
Semantic HTML5 Layout: header, nav, main, section, article, aside, footer and Heading Structure for Real Pages
Beginner Topic 1 of 3

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.

TagUse it for
headerIntro area of the page or of a section: logo, title, nav
navA group of main navigation links
mainThe main unique content. Use one per page
sectionA themed group of content that usually has a heading
articleContent that makes sense alone: a post, news story or product card
asideRelated side content, such as tips or ads
footerClosing info: copyright, contact, links
addressContact details for the page or article author
figureAn 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>&copy; 2026 Fresh Bites</p> </footer> </body>

Section or Article or Div?

  1. Could this content stand alone in a feed or list? Use article
  2. Is it a themed group that deserves a heading? Use section
  3. Is it only for styling or layout? Use div
  4. 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 h1 that names the page
  • Use h2 for main sections and h3 for parts inside them
  • Do not skip from h2 to h5 just for size

Practice

  1. Rewrite a page made of div tags using semantic tags
  2. Add a skip link and test it with the Tab key
  3. 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.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators