<nav>
SectionsDefines a section of navigation links. Commonly used for primary site navigation, breadcrumbs, or table of contents.
Common Attributes
roleExample
<nav> <a href="/">Home</a> <a href="/about">About</a> </nav>
About the <nav> Element
The <nav> HTML element belongs to the Sections category of HTML elements. Defines a section of navigation links. Commonly used for primary site navigation, breadcrumbs, or table of contents. Understanding when and how to use this element is essential for building well-structured, accessible, and SEO-friendly web pages.
The <nav> element requires both an opening <nav> and closing </nav> tag. Content placed between these tags becomes the element's children. This element is part of the current HTML Living Standard and is supported in all modern browsers including Chrome, Firefox, Safari, and Edge.
Proper use of semantic HTML elements like <nav> improves document structure, helps screen readers interpret content correctly, and provides signals to search engines about the purpose of different sections of your page. This leads to better accessibility scores, improved SEO rankings, and more maintainable code.