HTML <nav> tag

Updated: 11/13/2018 by Computer Hope
HTML nav tag

When writing in HTML, the <nav> tag is a block element used to designate a block of major navigational links. It is useful for connecting users to the main sections of a website, or for navigation within a page. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.

Note

Browsers can use this element to determine whether or not to render navigational content for disabled users.

Example of <nav> code

<nav>
<a href="https://www.computerhope.com/oh.htm">Help</a> |
<a href="https://www.computerhope.com/tips/">Tips</a> | <a href="https://www.computerhope.com/jargon.htm">Dictionary</a> | <a href="https://www.computerhope.com/history/">History</a> |
<a href="https://www.computerhope.com/forum/">Forums</a> |
<a href="https://www.computerhope.com/contact/">Contact</a>
</nav>

Example result


Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. While the <nav> tag does not have any unique attributes, it does utilize all of the standard attributes.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
All versions 9.0+ 4.0+ 5.0+ 11.1+ 5.0+

Browser, Compatibility, Hyperlink, Navigate, Web design terms