Nav HTML

HTML <nav> Tag

To specify a section to contain navigation links, the HTML <nav> tag is used. The link is either within the current document or to another document. It does not contain all the links, but only the major block of navigation links. It was introduced in HTML5.

Syntax:

<nav>.....</nav>

Example:

<!DOCTYPE html>
<html>
<body>
<p> Example: </p>
<nav>
<a href="/a">A_List</a> |
<a href="/b">B_List</a> |
<a href="/c">C_List</a> |
<a href="/d">D_List</a>
</nav>
</body>
</html>

Explanation:

In the above example, we have used the HTML <nav> tag to add a major block of navigation links.

Global attributes:

The HTML global attributes are supported by the HTML <nav> tag.

Event attributes:

The HTML event attributes are supported by the HTML <nav> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera, and Safari.

Please follow and like us:
Content Protection by DMCA.com