HTML5 nav Tag

The HTML5 nav tag is used to define navigation links.  Use the <nav> tag when you need to set a group of links, not every link of the document.

Example

Here’s an example adding navigation links using the nav tag,

<!DOCTYPE html>
<html>
<head>
<title>Understanding HTML5 nav tag</title>
</head>
<body>
<p>Studyopedia Sections</p>
<nav>
<a href="https://studyopedia.com/tutorials/">Tutorials</a> |
<a href="https://studyopedia.com/quiz/">Quiz</a> |
<a href="https://studyopedia.com/forums/">Forums</a>
</nav>
</body>
</html>

Here’s the output, we added three sections under the HTML5 nav element and now it is looking like a horizontal menu,

HTML5 nav Tag

HTML5 meter Tag
HTML5 output Tag
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment