Document Structure: Header, Nav, Main, Footer
You'll learn how HTML landmark elements create a clear, navigable page structure that helps screen reader users quickly find and jump to different sections of your page.
The Core Idea
Think of a building with clearly labeled sections: lobby, hallway, main rooms, and exit area. Landmarks in HTML work the same way for screen reader users. Instead of navigating through every single element on a page, they can jump directly to "navigation" or "main content" just like you might skip to a specific chapter in a book.
HTML provides semantic elements that act as these landmarks:
<header>: The introductory content, typically containing site branding and top-level navigation<nav>: Navigation links for major sections of the site or page<main>: The primary content of the page (there should be only one per page)<footer>: Footer information like copyright, links, contact details
Why This Matters
Screen readers announce these landmarks and let users navigate between them with keyboard shortcuts. Without them, a blind user might have to tab through dozens of navigation links just to reach your article content. With proper landmarks, they can skip directly to <main>.
<header>
<h1>My Website</h1>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
</header>
<main>
<h2>Welcome</h2>
<p>This is the primary content...</p>
</main>
<footer>
<p>© 2024 My Website</p>
</footer>
Key Takeaway: Using <header>, <nav>, <main>, and <footer> creates navigable landmarks that let screen reader users quickly jump to different page sections, dramatically improving their browsing efficiency and experience.