The <nav> element marks a section of major navigation links — site menus, tables of contents, indexes, or breadcrumbs — within the current document or to other pages.
It is sectioning content with an implicit navigation landmark. Put links inside <ul> / <ol> when a list fits; wrap each destination with <a>.
Baseline · Widely available.
Not deprecated. Stable across browsers since about July 2015 (HTML5 landmark).
Do not overuse.
Not every link group needs <nav>. Reserve it for major navigation blocks so landmarks stay useful for screen reader users.
ARIA note.
Skip redundant role="navigation" — <nav> already exposes that role. Prefer aria-label when a page has more than one <nav>.
Syntax
HTML Syntax
syntax.html
<nav>…links…</nav>
Both start and end tags are required. Content is flow content (often a list of links).
Reference
Attributes
<nav> has no element-specific attributes. Use global attributes; these are the ones you will reach for most often:
Attribute
Description
Try it
(none specific)
No tag-only attributes — meaning comes from the element itself
Place <nav> inside <footer> when the links are navigational.
Label it (e.g. Footer) so it differs from the main menu landmark.
Keep legal / utility links in a short list.
Skip <nav> if the footer only has a copyright line with no real navigation set.
Watch out
Edge Cases & Pitfalls
overuse
Wrapping every link cluster
Too many navigation landmarks dilute the landmark list. Use <nav> for major blocks only.
a11y
Unnamed multiple navs
Two unlabeled <nav>s both announce as “navigation.” Add aria-label or a heading + aria-labelledby.
role
Redundant role="navigation"
<nav> already maps to that role. Extra roles on nav are not allowed in the HTML mapping.
semantics
div with the same look
A styled <div> is not a landmark. Prefer real <nav> for major menus.
header
Nav inside header
Valid and common. <header> can contain site branding plus a primary <nav>.
menu
<menu> is not a replacement
<menu> is for toolbar-style lists of commands. Site navigation still belongs in <nav>.
Compatibility
Browser Support
The <nav> element is core HTML sectioning content in every modern browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<nav>
Widely available since about July 2015. Chrome, Firefox, Safari, Edge, and Opera all support it as a navigation landmark.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet Explorer9+
Supported
<nav>Widely supported
Bottom line: Safe to use everywhere for major navigation. Label multiple navs and avoid wrapping trivial link groups.
Remember
Key Takeaways
Role:<nav> marks major navigation as a landmark.
Structure: lists + links are the usual pattern; breadcrumbs often use <ol>.
A11y: label multiple navs; do not add a redundant navigation role.
Practice: fewer, clearer navs beat wrapping every link set.
One line: use <nav> for major link blocks, and name each landmark when you have more than one.
UA style
Default CSS Settings
User-agent stylesheets typically treat <nav> like other sectioning blocks:
default.css
nav {
display: block;
}
Layout (horizontal bar, sidebar, sticky header) comes from your CSS — not from the tag itself.
Frequently Asked Questions
The nav element marks a major block of navigation links — site menus, tables of contents, indexes, or breadcrumbs. Assistive technology can jump to it as a navigation landmark.
No. nav supports only the global HTML attributes. Use aria-label or aria-labelledby when a page has more than one nav so each landmark has a clear name.
No. Reserve nav for major navigation. A short list of links in a footer or paragraph does not always need its own nav.
It is common and clear, but not required. nav can contain lists, headings, or prose with links. Lists help convey structure to users and CSS.
By default nav has the implicit navigation role. Do not add role="navigation" yourself — it is redundant. Other roles are not permitted on nav.
Yes. For example one for primary site links and one for on-page sections. Label each with aria-label (or aria-labelledby) so landmarks stay distinct.