Nav
Semantic reference for <nav>.
Usage
html
<nav aria-label="Primary navigation">
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/blog">Blog</a>
</nav>The <nav> element represents a navigation section with links to other pages or sections within the page.
Accessibility
- Creates a
navigationlandmark role automatically. - Use
aria-labelto distinguish multiple navs on the same page (e.g., "Primary navigation", "Footer navigation").
