Back to HTML

The nav Element and Landmark Navigation

Coding Tutorials Team 20 June 2026

The nav element marks a block of navigation links, and it becomes a landmark that assistive technology can jump to or skip past. It is simple to use and easy to overuse.

The basic use

<nav aria-label="Main"> <ul> <li><a href="/html/">HTML</a></li> <li><a href="/css/">CSS</a></li> <li><a href="/javascript/">JavaScript</a></li> </ul> </nav>

A list inside the nav is the convention rather than a requirement, and it is worth following: a screen reader announces how many items the menu contains, which lets the user decide whether to listen or move on.

What counts as navigation

The element is intended for major navigation blocks, not for every link on a page. The clear cases are a primary site menu, a footer menu, a breadcrumb trail, pagination controls, and a table of contents for a long document.

The clear non-cases are links within a paragraph of prose, a single link back to a listing, a group of social media icons, and the links inside an article card. These are links, and marking them as navigation regions adds landmarks that carry no useful meaning.

The test is whether a user would plausibly want to jump straight to this block in order to move around the site. If not, it does not need to be a landmark.

Label every nav when there is more than one

Landmarks are announced by role, so several unlabelled navigation regions all announce identically and the user has no way to tell which is the main menu.

<nav aria-label="Main"> ... </nav> <nav aria-label="Breadcrumb"> ... </nav> <nav aria-label="Footer"> ... </nav>

Do not include the word navigation in the label. The role is already announced, so a label of main navigation produces a duplicated announcement. Just name the region.

Where a visible heading already names the block, an aria-labelledby attribute pointing at its id is better than a separate label, because it keeps the two in step and matches what a voice control user can see.

Marking the current page

The link to the page currently being viewed should carry an aria-current attribute with a value of page. A class alone styles it and communicates nothing.

The same attribute works for a breadcrumb trail, where the final item is the current page, and it accepts other values such as step for a multi-step process.

Skip links depend on this structure

A keyboard user tabbing through a page encounters every navigation link before reaching the content, on every page. A skip link, placed as the first focusable element and pointing at the main element, lets them bypass it.

The convention hides it visually until it receives focus. Hiding it with display none removes it from the tab order entirely, which is the usual implementation mistake and leaves the page with a skip link nobody can use.

Nav does not create a menu

The element provides no behaviour. It does not make links horizontal, it does not create a dropdown, and it does not produce a mobile menu. All of that is CSS and, for dropdowns, JavaScript.

It is also worth avoiding the menu and menuitem roles when building site navigation. Those roles describe application menus of the kind found in desktop software, and they bring keyboard expectations that do not match a list of links. A site menu is a list of links and should be marked up as one.

Mobile menus need attention

A menu collapsed behind a toggle needs the toggle to be a real button, to carry an aria-expanded attribute reflecting its state, and to actually hide the links when closed rather than merely moving them off screen.

Links positioned off screen but not hidden remain in the tab order, so a keyboard user tabs into an invisible menu and loses track of where focus is. Hiding the container properly when collapsed avoids that entirely.

Pagination and table of contents

Pagination controls are navigation and are conventionally an ordered list of page links inside a labelled nav, with the current page carrying an aria-current attribute. Marking the current page as a link to itself is worth avoiding, since it navigates nowhere and confuses the sequence.

A table of contents for a long article is navigation too, and one of the more useful landmarks you can offer, because it lets a user jump into the middle of a document rather than working through it linearly.

Checking your landmarks

An accessibility inspector or browser extension lists the landmarks on a page. A well structured page shows a banner, one or more labelled navigation regions, a main, perhaps a complementary region, and a contentinfo.

Seeing six unlabelled navigation landmarks is a sign the element has been applied to every group of links on the page, which is worth correcting: fewer, well named landmarks are more useful than many indistinguishable ones.