CodesJava

Easy learning with example program codes

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>

Output:

Explanation:

In the above example, we have used the HTML <nav> tag to add 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:
error
Posted in HTML   









Copyright © 2019 CodesJava DMCA.com Protection Status