<nav>: The Navigation Section element - HTML: HyperText Markup Language | MDN (2024)

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

The <nav> HTML 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.

Try it

Attributes

Usage notes

  • It's not necessary for all links to be contained in a <nav> element. <nav> is intended only for a 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. 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 (<ul>) of links. With appropriate CSS, this can be presented as a sidebar, navigation bar, or drop-down menu.

html

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

The semantics of the nav element is that of providing links. However a nav element doesn't have to contain a list, it can contain other kinds of content as well. In this navigation block, links are provided in prose:

html

<nav> <h2>Navigation</h2> <p> You are on my home page. To the north lies <a href="/blog">my blog</a>, from whence the sounds of battle can be heard. To the east you can see a large mountain, upon which many <a href="/school">school papers</a> are littered. Far up this mountain you can spy a little figure who appears to be me, desperately scribbling a <a href="/school/thesis">thesis</a>. </p> <p> To the west are several exits. One fun-looking exit is labeled <a href="https://games.example.com/">"games"</a>. Another more boring-looking exit is labeled <a href="https://isp.example.net/">ISP™</a>. </p> <p> To the south lies a dark and dank <a href="/about">contacts page</a>. Cobwebs cover its disused entrance, and at one point you see a rat run quickly out of the page. </p></nav>

Result

Technical summary

Content categories Flow content, sectioning content, palpable content.
Permitted content Flow content.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts flow content.
Implicit ARIA role navigation
Permitted ARIA roles No role permitted
DOM interface HTMLElement

Specifications

Specification
HTML Standard
# the-nav-element

Browser compatibility

BCD tables only load in the browser

See also

<nav>: The Navigation Section element - HTML: HyperText Markup Language | MDN (2024)
Top Articles
Testimonials
What are the benefits and drawbacks of using hardware-based encryption over software-based encryption?
Po Box 7250 Sioux Falls Sd
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Tesla Supercharger La Crosse Photos
Kokichi's Day At The Zoo
Kansas Craigslist Free Stuff
Obituary (Binghamton Press & Sun-Bulletin): Tully Area Historical Society
Best Theia Builds (Talent | Skill Order | Pairing + Pets) In Call of Dragons - AllClash
Acbl Homeport
123 Movies Babylon
Mercy MyPay (Online Pay Stubs) / mercy-mypay-online-pay-stubs.pdf / PDF4PRO
Azeroth Pilot Reloaded - Addons - World of Warcraft
Springfield Mo Craiglist
Love In The Air Ep 9 Eng Sub Dailymotion
Midlife Crisis F95Zone
Craftology East Peoria Il
Eva Mastromatteo Erie Pa
Palm Coast Permits Online
NHS England » Winter and H2 priorities
Bj Alex Mangabuddy
Unity - Manual: Scene view navigation
Governor Brown Signs Legislation Supporting California Legislative Women's Caucus Priorities
What Is The Lineup For Nascar Race Today
Jordan Poyer Wiki
Walmart Pharmacy Near Me Open
Beaufort 72 Hour
Bleacher Report Philadelphia Flyers
4Oxfun
JVID Rina sauce set1
Marokko houdt honderden mensen tegen die illegaal grens met Spaanse stad Ceuta wilden oversteken
Ou Football Brainiacs
Miles City Montana Craigslist
Angel Haynes Dropbox
Publix Christmas Dinner 2022
Mini-Mental State Examination (MMSE) – Strokengine
Motor Mounts
Kamzz Llc
4083519708
Second Chance Apartments, 2nd Chance Apartments Locators for Bad Credit
6576771660
Here's Everything You Need to Know About Baby Ariel
Port Huron Newspaper
Devotion Showtimes Near Showplace Icon At Valley Fair
Headlining Hip Hopper Crossword Clue
552 Bus Schedule To Atlantic City
Germany’s intensely private and immensely wealthy Reimann family
Diccionario De Los Sueños Misabueso
Roller Znen ZN50QT-E
Sam's Club Fountain Valley Gas Prices
Latest Posts
Article information

Author: Margart Wisoky

Last Updated:

Views: 5983

Rating: 4.8 / 5 (78 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Margart Wisoky

Birthday: 1993-05-13

Address: 2113 Abernathy Knoll, New Tamerafurt, CT 66893-2169

Phone: +25815234346805

Job: Central Developer

Hobby: Machining, Pottery, Rafting, Cosplaying, Jogging, Taekwondo, Scouting

Introduction: My name is Margart Wisoky, I am a gorgeous, shiny, successful, beautiful, adventurous, excited, pleasant person who loves writing and wants to share my knowledge and understanding with you.