<nav>...</nav>

HTML4 HTML5

Used to designate a section of the page containing main navigation links (e.g., main site menu, table of contents, or page navigation/pagination)[cite: 3]. Not all link groups on a page need to be inside a <nav> tag – it is primarily intended for key navigation blocks[cite: 3].

Both opening and closing tags are mandatory[cite: 3].

Attributes:

Example

Code:

<nav> <ul> <li><a href="#home">Home</a></li> <li><a href="#about">About Us</a></li> <li><a href="#contact">Contact</a></li> </ul> </nav>

The browser will interpret this code as follows: