HTML nav element

HTML nav element defines a block that contains the links related to the other pages or sections of the content in the same page.

<nav>
 <ul>
   <li><a href="#"> Home </a></li>
   <li><a href="#"> News </a></li>
   <li><a href="#"> Channels </a></li>
  </ul>
</nav>
</>

Tag Uses

Specific uses of <nav> tag

It is usually used to make a navigation bar or a side bar. The navigation bar is made in such a way that user can find information on the website quickly and easily.

Tag omission

Both opening and closing tags are necessary for the nav element.

Global Attributes

All the global attributes are applicable on the nav element.



Was this article helpful?