The HTML <nav> tag

Definition and Usage

<nav> The tag defines a set of navigation links.

Please note that not all links should be placed in <nav> within the element.<nav> This element is only used for the main navigation link block.

Browsers (such as screen readers for disabled users) can use this element to determine whether to omit the initial rendering of this content.

See also:

HTML DOM Reference Manual:Nav Object

Examples

A set of navigation links:

<nav>
  <a href="/html/">HTML</a> |
  <a href="/css/">CSS</a> |
  <a href="/js/">JavaScript</a> |
  <a href="/python/">Python</a>
</nav>

Try It Yourself

Global Attributes

<nav> The tag also supports Global Attributes in HTML.

Event Attributes

<nav> The tag also supports Event Attributes in HTML.

Default CSS Settings

Most browsers will display the following default values <nav> Element:

nav {
  display: block;
}

Browser Support

The numbers in the table indicate the first browser version to fully support this tag.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
5.0 9.0 4.0 5.0 11.1