<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
The Wheel Options Strategy: Your Comprehensive Guide to Steady Income Generation - Option Samurai Blog
Should You Use a VPN When Trading?
Tryst Utah
Trevor Goodwin Obituary St Cloud
Ymca Sammamish Class Schedule
Explore Tarot: Your Ultimate Tarot Cheat Sheet for Beginners
Craigslist Portales
Eric Rohan Justin Obituary
5 Bijwerkingen van zwemmen in een zwembad met te veel chloor - Bereik uw gezondheidsdoelen met praktische hulpmiddelen voor eten en fitness, deskundige bronnen en een betrokken gemeenschap.
Fcs Teamehub
Joe Gorga Zodiac Sign
Clairememory Scam
Erskine Plus Portal
iOS 18 Hadir, Tapi Mana Fitur AI Apple?
Pizza Hut In Dinuba
Urban Airship Expands its Mobile Platform to Transform Customer Communications
Milspec Mojo Bio
Persona 4 Golden Taotie Fusion Calculator
Healthier Homes | Coronavirus Protocol | Stanley Steemer - Stanley Steemer | The Steem Team
Walgreens Alma School And Dynamite
Craigslist Battle Ground Washington
Sister Souljah Net Worth
Https E22 Ultipro Com Login Aspx
City Of Durham Recycling Schedule
Paris Immobilier - craigslist
4 Methods to Fix “Vortex Mods Cannot Be Deployed” Issue - MiniTool Partition Wizard
Free T33N Leaks
Usa Massage Reviews
Yu-Gi-Oh Card Database
R3Vlimited Forum
Khatrimmaza
Calculator Souo
Dumb Money, la recensione: Paul Dano e quel film biografico sul caso GameStop
Culver's Hartland Flavor Of The Day
Watchdocumentaries Gun Mayhem 2
Suspect may have staked out Trump's golf course for 12 hours before the apparent assassination attempt
Glossytightsglamour
Spinning Gold Showtimes Near Emagine Birch Run
Western Gold Gateway
Go Smiles Herndon Reviews
Greater Keene Men's Softball
Craigslist Pets Huntsville Alabama
Smith And Wesson Nra Instructor Discount
T&Cs | Hollywood Bowl
Wayne State Academica Login
Invalleerkracht [Gratis] voorbeelden van sollicitatiebrieven & expert tips
Comanche Or Crow Crossword Clue
Avance Primary Care Morrisville
Headlining Hip Hopper Crossword Clue
Unpleasant Realities Nyt
Provincial Freeman (Toronto and Chatham, ON: Mary Ann Shadd Cary (October 9, 1823 – June 5, 1893)), November 3, 1855, p. 1
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.