HTML <nav> tag

Updated: 04/26/2017 by Computer Hope

HTML nav tagWhen 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 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">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

Internet Explorer Firefox Safari Opera Chrome
9.0+ 4.0+ 5.0+ 11.1+ 6.0+

Browser, Compatibility, Hyperlink, Navigate