How to use the HTML5 nav element

The HTML5 navigation element, also referred to as the nav element, represents that part of the page containing the links to other parts of the website or to external websites/pages. By using the nav element, parsers will immediately link the element to the website’s navigation which in general is part of the header, the sidebar or the footer. The nav should not be used to insert only a few small links to your web page. In that particular case one can easily use the well-known ul. Please find below a clear nav element example.

<nav>
<ul>
<li>Menu Item 1</li>
<li>Menu Item 2</li>
<li>Menu Item 3</li>
<li>Menu Item 4</li>
<li>Menu Item 5</li>
<li>Menu Item 6</li>
</ul>
</nav>


Was this useful?