The HTML <nav> tag
The HTML <nav> element marks a block of major navigation links — a main menu, a table of contents, breadcrumbs. It is a navigation landmark that lets screen-reader users jump straight to (or skip) the navigation. Not every group of links needs a <nav>.
Overview
The <nav> element identifies a block of major navigation links. Browsers expose it to assistive technology as a navigation landmark, which lets keyboard and screen-reader users jump straight to it — or skip past it — instead of wading through every link. That single piece of semantics is a real usability win.
Reserve it for primary navigation: the main site menu, breadcrumbs, pagination, or an on-page table of contents. Not every group of links needs one — a few links inside a paragraph, or the handful in a <footer>, are fine as a plain list. Overusing <nav> dilutes its value by creating landmarks that are not worth navigating to.
When a page has more than one <nav> — say a primary menu and a footer menu — give each an accessible name with aria-label (for example "Primary" and "Footer") so they can be told apart in the landmarks list. Inside, mark the links up as a <ul> so their number is announced.
Syntax
<nav aria-label="Primary">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
Example
<nav aria-label="Primary">
<a href="#" aria-current="page">Home</a> ·
<a href="#">Docs</a> ·
<a href="#">About</a>
</nav>
Best practices
- Reserve
<nav>for major navigation — site menus, breadcrumbs, pagination — not every group of links. - Give each
<nav>on a page a unique accessible name with aria-label so they are distinguishable. - Put the links in a <ul> so assistive technology announces how many there are.
- Mark the current page in the nav with
aria-current="page"so users know where they are.
Accessibility
The <nav> landmark lets screen-reader users jump to or skip navigation. Label multiple navs with aria-label, mark the current page link with aria-current="page", and provide a skip link for keyboard users.
Frequently asked questions
When should I use the nav element?
Can a page have more than one nav?
Do footer links need a nav element?
<nav> for navigation that is worth jumping to as a landmark.