HTML nav Tag Tutorial

In this section, we will learn what HTML <nav> element is and how to use it.

HTML for Navigation Bar: What is <nav> Tag in HTML?

HTML <nav> element stands for navigation and is a container element which is used to group together those elements that we consider them as the navigation elements of a webpage.

For example, in many websites you typically see a menu on top of the page or on the right and left side where there are a bunch of links you can click to navigate to other pages of that website.

So these elements that are basically navigational links to other pages of the same website are considered as the elements of the HTML <nav>.

Note: you shouldn’t use the <nav> element anywhere in an HTML document if there were one or two links! HTML <nav> element is only intended for a major block of navigational links.

HTML <nav> Tag Syntax:

<nav> </nav>

Example: menu bar in HTML

See the Pen menu bar in HTML by Omid Dehghan (@odehghan) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies