Make Screen Reader Navigation Easier with the header Landmark
The next HTML5 element that adds semantic meaning and improves accessibility is theheadertag. It's used to wrap introductory information or navigation links for its parent tag and works well around content that's repeated at the top on multiple pages.
headershares the embedded landmark feature you saw withmain, allowing assistive technologies to quickly navigate to that content.
Note:Theheaderis meant for use in thebodytag of your HTML document. It is different than theheadelement, which contains the page's title, meta information, etc.
Camper Cat is writing some great articles about ninja training, and wants to add a page for them to his site. Change the topdivthat currently contains theh1to aheadertag instead.
<body>
<header><h1>Training with Camper Cat</h1></header>
<main>
<section id="stealth">
<h2>Stealth & Agility Training</h2>
<article><h3>Climb foliage quickly using a minimum spanning tree approach</h3></article>
<article><h3>No training is NP-complete without parkour</h3></article>
</section>
<section id="combat">
<h2>Combat Training</h2>
<article><h3>Dispatch multiple enemies with multithreaded tactics</h3></article>
<article><h3>Goodbye world: 5 proven ways to knock out an opponent</h3></article>
</section>
<section id="weapons">
<h2>Weapons Training</h2>
<article><h3>Swords: the best tool to literally divide and conquer</h3></article>
<article><h3>Breadth-first or depth-first in multi-weapon training?</h3></article>
</section>
</main>
</body>