HTML5 nav tag, Example of <nav> tag of HTML5.


 

HTML5 nav tag, Example of <nav> tag of HTML5.

In this section, you will see the use of implementation of <nav> tag.

In this section, you will see the use of implementation of <nav> tag.

HTML5 nav tag, Example of <nav> tag of HTML5.

Description:

The <nav> tag is present only in HTML5. It does not support HTML4.01. It makes group of related links or a section of navigation links. Ex home, next, previous, contact us, etc. It is not important, that all links of page should be inside <nav> tag.
OR
If we wants a group of related links, then we will use <nav> tag. It has both start and end tag.

Declaration Syntax :
Declaration syntax of <nav> in HTML5.
<nav> Navigation controls </nav>

Example of <nav> in HTML5:

Code:
NavTag.html
<!doctype html>
<html >
<head>
<title>navigation tag Example.</title>
</head><body>
<h2>Example of &lt;nav&gt; navigation tag of HTML5.</h2><nav>
<a href="http://www.roseindia.net/tutorial/html/html5/HTML5hrTag.html">
Previous</a>
<a href="http://www.roseindia.net/">Home</a>
<a href="http://www.roseindia.net/services/">next</a>
</nav><br></body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

It is present only HTML5.

Ads