nav

Introduced in HTML 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 <footer> element often has a list of links that don't need to be in a <nav> element.
  • A document may have several <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.

Usage context

Permitted content Flow content
Tag omission None, both the start tag and the end tag are mandatory
Permitted parent elements Any element that accepts flow content. Note that a <nav> element must not be a descendant of an <address> element.
Normative document HTML5, section 4.4.3

Attributes

This element has no other attributes than the global attributes, common to all elements.

DOM Interface

This element implements the HTMLElement interface.

Examples

<nav>
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Contact</a></li>
  </ul>
</nav>

Compatibility

  • Desktop
  • Mobile

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 5 4.0 (2.0) 9.0 11.10 4.1
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 2.2 4.0 (2.0) 9.0 11.0 5.0 (iOS 4.2)

See also

Tags (5)

Edit tags

Attachments (0)

 

Attach file