HTML <nav> tag
Updated: 09/12/2023 by Computer Hope
When writing in HTML (hypertext markup language), the <nav> tag is a block element designating 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, and 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
All HTML tags support standard attributes that define the settings of an HTML element. Unlike other HTML tags, the <nav> tag has no unique attributes.
Compatibility
Edge | Internet Explorer | Firefox | Safari | Opera | Chrome |
---|---|---|---|---|---|
All versions | 9.0+ | 4.0+ | 5.0+ | 11.1+ | 5.0+ |
Browser, Compatibility, Container tag, Hyperlink, Navigate, Web design terms