CHAPTER 39 · HTML
Semantic page structure: give each area a clear purpose
Learn header, nav, main, section, article, aside and footer. Choose by meaning and keep a page understandable without decorative layout.
Download example files (ZIP)Semantic means about meaning
A quick map of the elements
Header: introductory content for a page or suitable section. Nav: a significant navigation group. Main: the dominant content of this document. Section: a related topic group, usually with a heading. Article: a self-contained item that makes sense independently. Aside: supplementary material related to the surrounding discussion. Footer: closing or related information for a page or suitable section.
Header is not head
Nav and main help readers find their place
Section and article answer different questions
Aside and footer describe a relationship
Structure still needs clear content
Follow the idea
- 1Header and nav: introduction and routes
- 2Main and section: the central topics
- 3Article: a complete independent item
- 4Aside and footer: related or closing information
These names describe purpose, not automatic screen positions.
Complete program: page-regions.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>A Page with Clear Regions</title>
</head>
<body>
<h1>A study club page</h1>
<header><p>Practice Club</p></header>
<nav aria-label="Page sections">
<a href="#meeting">Meeting</a> | <a href="#bring">What to bring</a>
</nav>
<main>
<section id="meeting">
<h2>Next meeting</h2>
<p>We will practise writing clear links.</p>
</section>
<section id="bring">
<h2>What to bring</h2>
<ul>
<li>A notebook</li>
<li>One question</li>
</ul>
</section>
</main>
<footer><p>This is a fictional practice page.</p></footer>
</body>
</html>This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.
Complete program: article-notice.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>An Independent Club Notice</title>
</head>
<body>
<h1>Practice club notices</h1>
<main>
<article>
<header>
<h2>Room change for the link workshop</h2>
<p>Posted <time datetime="2027-02-08">8 February 2027</time></p>
</header>
<p>The fictional link workshop will meet in Room B-204 instead of B-201.</p>
<section>
<h3>What stays the same</h3>
<p>The practice topic and starting time are unchanged.</p>
</section>
<footer><p>Prepared by the practice desk.</p></footer>
</article>
<aside>
<h2>Related reminder</h2>
<p>Keep your original notes for comparison.</p>
</aside>
</main>
</body>
</html>This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.
Problem and solution
Common mistakes and useful tips
Do not confuse head and header. Do not put main inside navigation. Not every wrapper needs section. Article is not limited to newspaper stories. Semantic tags do not create a visual grid. Use explicit heading levels.
Practice questions
What does semantic mean here? Which area holds dominant page content? Can an article contain a section? Must aside appear on the right? How do head and header differ? Remove styling from a semantic page. What should remain clear?
Check your practice answers
The element describes the purpose of its content. Main; use one visible main in these ordinary documents. Yes. A complete item can have topic groups. No. It describes supplementary content, not position. Head stores document information. Header introduces visible content. Reading order, headings, navigation and relationships between main and supplementary content.
Interview questions
When choose article instead of div?
Can a page have several headers or footers?
Does section reset heading levels?
Why use native semantic elements?
Quick revision
Choose regions by purpose. Head and header differ. Use headings to describe topics. HTML expresses structure; CSS controls placement.