05 / 08

What is the use of <nav>?

Use of <nav> Element

The <nav> element is a semantic block-level element used to define a section of a page intended for navigation. It groups together links that help users move around the website or within the same document.

Key Points
  1. 1<nav> is used for primary navigation menus, sidebars, or other collections of major links.
  2. 2

    It provides meaning to assistive technologies (like screen readers), which identify it as a navigation region.

  3. 3

    It improves SEO because search engines understand that links inside <nav> are for site navigation.

  4. 4

    A page can have multiple <nav> elements (e.g., one for the main site menu, another for footer links).

  5. 5

    Not every group of links needs to be inside <nav> — only the main navigational links.

Example Usage

In short: Use <nav> to group major navigational links that help users move through your website or document structure.