CSS Portal

HTML <nav> Tag

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The <nav> element represents a section of a page intended for navigation links. It is a semantic HTML element, meaning it conveys meaning about the content it contains, helping both browsers and assistive technologies understand the purpose of the content. Typically, <nav> groups together links that allow users to navigate through different sections of a website or to other related documents.

Common use cases include:

  • Main site navigation menus, often appearing at the top or side of a page.
  • Table of contents for a document or section.
  • Pagination links for multi-page content.
  • Sections of links to related resources, such as “related articles” or “helpful links” sections.

A page can contain multiple <nav> elements, each dedicated to different navigational purposes. For example, a website may have one <nav> for the main site menu, another for secondary links in the footer, and a third for internal table-of-contents links within an article.

The <nav> element helps improve accessibility because assistive technologies, like screen readers, can quickly identify it as a navigation region. This allows users to skip directly to or around the navigation if they wish, improving the overall user experience.

It’s worth noting that not all groups of links on a page should be wrapped in <nav>. Only sections that provide major navigation should use it; small sets of links within a paragraph or footer that are not primary navigation do not require a <nav> element.

Properties

Permitted Parents
Any element that accepts flow content
Content
Block, inline and text
Start/End Tags
Start tag: required, End tag: required

Example

<nav>
<a href="/">Home</a> |
<a href="/css-validator/">CSS Validator</a> |
<a href="/html-tags/">HTML Tags</a> |
<a href="/contact.php">Contact</a>
</nav>

Attributes

None

Global Attributes

The <nav> tag also supports the Global Attributes in HTML5

Event Attributes

The <nav> tag also supports the Event Attributes in HTML5

Browser Support

The following information will show you the current browser support for the HTML <nav> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 26th December 2025

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!