The <nav> tag is used to declaring the navigational section in HTML documents. Websites typically have sections dedicated to navigational links, which enables user to navigate the site. These links can be placed inside a nav tag.
In other words, nav element represents section of page whose purpose is to provide navigational links, either in current document or to other document. The links in nav element may points to other webpages or to different sections of same webpage. It is semantic element. Common examples of nav element are menus, tables, contents, and indexes.
<nav> Links... </nav>
Use of Nav Tag: The nav tag is reserved for primary navigation areas, like main menu across top of the page or section. A document may have several nav elements, for example, site navigation and one for intra page navigation. Links within nav tag can be codes within an ul list or simply coded as separate links, without ul element. This element makes it much easier to create a navigation menu, creates a neat horizontal manu of text links, and helps screen reading software to correctly identify primary navigation areas in document.
Browser Supports: The browsers which support nav tag are:
- Google chrome 6.0 and above
- Internet Explorer 9.0 and above
- Mozilla 4.0 and above
- Safari 5.0 and above
- Opera 11.1 and above
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.