{{HTMLVersionHeader(5)}}
Summary
The HTML Navigation Element (<nav>
) represents a section of a page that links to other pages or to parts within the page: a section with navigation links.
Usage notes:
- Not all links of a document must be in a
<nav>
element, which is intended only for major block of navigation links; typically the {{HTMLElement("footer")}} element often has a list of links that don't need to be in a {{HTMLElement("nav")}} element. - A document may have several {{HTMLElement("nav")}} elements, for example, one for site navigation and one for intra-page navigation.
- User agents, such as screen readers targeting disabled users, can use this element to determine whether to omit the initial rendering of this content.
- Content categories Flow content, sectioning content, palpable content.
- Permitted content Flow content.
- Tag omission {{no_tag_omission}}
- Permitted parent elements Any element that accepts flow content.
- DOM interface {{domxref("HTMLElement")}}
Attributes
This element only includes the global attributes.
Examples
<nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> </nav>
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', 'sections.html#the-nav-element', '<nav>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'sections.html#the-nav-element', '<nav>')}} | {{Spec2('HTML5 W3C')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 5 | {{CompatGeckoDesktop("2.0")}} | 9.0 | 11.10 | 4.1 |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 2.2 | {{CompatGeckoMobile("2.0")}} | 9.0 | 11.0 | 5.0 (iOS 4.2) |
See also
- Other section-related elements: {{HTMLElement("body")}}, {{HTMLElement("article")}}, {{HTMLElement("section")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}, {{HTMLElement("address")}};
- Sections and outlines of an HTML5 document.
{{HTML:Element_Navigation}}