Github

Udemy: Online Courses

Udemy


Categories

 

Udemy for Business

  • Get your team access to Udemy’s top 2,500 courses anytime, anywhere.

    Try Udemy for Business

Become an Instructor

  • Turn what you know into an opportunity and reach millions around the world.

    Learn more

Shopping cart

September Savings Spree

Get courses starting at just €10.99

80,000 online courses

Explore a variety of fresh topics

Expert instruction

Find the right instructor for you

Lifetime access

Learn on your schedule


Become an Instructor
Teach what you love. Udemy gives you the tools to create an online course.
Start teaching

Udemy for Business

Get unlimited access to 2,500 of Udemy’s top courses for your team.

Get Udemy for Business

  • Skip to main content
  • Select language
  • Skip to search
MDN Web Docs

  • Sign in

    • Català (ca)
    • Español (es)
    • Français (fr)
    • עברית (he)
    • Italiano (it)
    • 日本語 (ja)
    • 한국어 (ko)
    • Português (do Brasil) (pt-BR)
    • Português (Europeu) (pt-PT)
    • Română (ro)
    • Русский (ru)
    • Українська (uk)
    • 中文 (简体) (zh-CN)
    • 正體中文 (繁體) (zh-TW)
    • Add a translation


  • Edit

  • Advanced
    • History
    • Print this article

<nav>: The Navigation Section element

Jump to:
  1. Attributes
  2. Usage notes
  3. Examples
  4. Specifications
  5. Browser compatibility
  6. See also

The HTML <nav> element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are menus, tables of contents, and indexes.

The source for this interactive example is stored in a GitHub repository. If you’d like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.

Content categories Flow content , sectioning content , palpable content.
Permitted content Flow content .
Tag omissionNone, both the starting and ending tag are mandatory.
Permitted parentsAny element that accepts flow content .
Permitted ARIA rolesNone
DOM interface HTMLElement

Attributes

This element only includes the global attributes .

Usage notes

  • It’s not necessary for all links to be contained in a <nav> element. <nav> is intended only for major block of navigation links; typically the element represents a footer for its nearest sectioning content or sectioning root element. A footer typically contains information about the author of the section, copyright data or links to related documents.”><footer> element often has a list of links that don’t need to be in a element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are menus, tables of contents, and indexes.”><nav> element.
  • A document may have several element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are menus, tables of contents, and indexes.”><nav> elements, for example, one for site navigation and one for intra-page navigation.  aria-labelledby  can be used in such case to promote accessibility, see example .
  • User agents, such as screen readers targeting disabled users, can use this element to determine whether to omit the initial rendering of navigation-only content.

Examples

In this example, a <nav> block is used to contain an unordered list ( element represents an unordered list of items, typically rendered as a bulleted list.”><ul> ) of links. With appropriate CSS, this can be presented as a sidebar, navigation bar, or drop-down menu.

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

Specifications

SpecificationStatusComment
HTML Living Standard
The definition of ‘<nav>’ in that specification.
Living StandardNo change since latest W3C snapshot.
HTML5
The definition of ‘<nav>’ in that specification.
RecommendationInitial definition

Browser compatibility

The compatibility table in this page is generated from structured data. If you’d like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

  • Desktop
  • Mobile
FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support 5
Yes
4911.14.1
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support
Yes

Yes

Yes
4114.2
Yes
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic supportChrome
Full support

5
Edge
Full support

Yes
Firefox
Full support

4
IE
Full support

9
Opera
Full support

11.1
Safari
Full support

4.1
WebView Android
Full support

Yes
Chrome Android
Full support

Yes
Edge Mobile
Full support

Yes
Firefox Android
Full support

4
Opera Android
Full support

11
Safari iOS
Full support

4.2
Samsung Internet Android
Full support

Yes

Legend

Full support
 

Full support

See also

  • Other section-related elements: Element represents the content of an HTML document. There can be only one <body> element in a document.”><body> , element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). Examples include: a forum post, a magazine or newspaper article, or a blog entry.”><article> , element represents a standalone section — which doesn’t have a more specific semantic element to represent it — contained within an HTML document.”><section> , element represents a portion of a document whose content is only indirectly related to the document’s main content.”><aside> , is the most important and <h6> is the least. A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.”><h1> , is the most important and <h6> is the least. A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.”><h2> , is the most important and <h6> is the least. A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.”><h3> , is the most important and <h6> is the least. A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.”><h4> , is the most important and <h6> is the least. A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.”><h5> , is the most important and <h6> is the least. A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.”><h6> , element represents a multi-level heading for a section of a document. It groups a set of <h1>–<h6> elements.”><hgroup> , element represents introductory content, typically a group of introductory or navigational aids. It may contain some heading elements but also other elements like a logo, a search form, an author name, and so on.”><header> , element represents a footer for its nearest sectioning content or sectioning root element. A footer typically contains information about the author of the section, copyright data or links to related documents.”><footer> , element indicates that the enclosed HTML provides contact information for a person or people, or for an organization.”><address> ;
  • Sections and outlines of an HTML5 document .

Document Tags and Contributors


Tags: 

  • Element
  • HTML
  • HTML sections
  • Links
  • nav
  • Navigation
  • Reference
  • Sections
  • Web

Contributors to this page:

ntutangyun ,

mfuji09 ,

SphinxKnight ,

Sheppy ,

teoli ,

sideshowbarker ,

erikadoyle ,

Sebastianz ,

kscarfone ,

pwdst ,

medicdude ,

ethertank ,

cers ,

dhodder ,

fscholz ,

McGurk ,

trevorh ,

jswisher


Last updated by:
ntutangyun ,