Semantic structure: Primary navigation
A nav landmark groups major navigation links; a label distinguishes it from another navigation region.
Current edit
Understand the pattern
A nav landmark groups major navigation links; a label distinguishes it from another navigation region.
A nav landmark groups major navigation links; a label distinguishes it from another navigation region.
Misconceptions to reject
- A visual appearance alone guarantees the intended HTML meaning.
- Replacing semantic elements with generic divs automatically improves accessibility.
The preview is a sanitized subset, not a full browser compatibility test.
Worked example and expected result
<nav aria-label="Primary"><a href="/web/">Web course</a><a href="/unix/">UNIX course</a></nav>A nav landmark groups major navigation links; a label distinguishes it from another navigation region.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Semantic structure: Main landmarkTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.
Keep learning
- 01Semantic structure: Site headerA top-level header introduces the page or site. It is not a replacement for the main content landmark.Practice
- 02Semantic structure: Main landmarkThe main landmark contains the page-specific content, excluding repeated site navigation.Practice
- 03Semantic structure: Named sectionsA section groups a distinct topic. aria-labelledby can give the region its name from a visible heading.Practice