HTML nav Tag (2024)


Example

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 »

Definition and Usage

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

Notice that NOT all links of a document should be inside a <nav> element. The <nav> element is intended only for major blocks of navigation links.

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

Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Element
<nav> 5.0 9.0 4.0 5.0 11.1

Global Attributes

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

Event Attributes

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

Related Pages

HTML DOM reference: Nav Object

Default CSS Settings

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

nav {
display: block;
}

W3schools Pathfinder

Track your progress - it's free!

HTML nav Tag (2024)
Top Articles
Latest Posts
Article information

Author: Lakeisha Bayer VM

Last Updated:

Views: 6210

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Lakeisha Bayer VM

Birthday: 1997-10-17

Address: Suite 835 34136 Adrian Mountains, Floydton, UT 81036

Phone: +3571527672278

Job: Manufacturing Agent

Hobby: Skimboarding, Photography, Roller skating, Knife making, Paintball, Embroidery, Gunsmithing

Introduction: My name is Lakeisha Bayer VM, I am a brainy, kind, enchanting, healthy, lovely, clean, witty person who loves writing and wants to share my knowledge and understanding with you.