nav
I. Description
The
HTML
<nav>
element is used to hold navigation
links (
<a>
). Whenever you have a group of navigation links,
such as a sidebar, they should probably be inside of a
<nav>
element.
II. Examples
<!DOCTYPE html>
<html>
<head>
<title>Example Page</title>
</head>
<body>
<header>
<nav>
<a title="Home" href="/">Home</a>
<a title="Weather" href="/weather">Weather</a>
<a title="Sports" href="/sports">Sports</a>
<a title="Technology" href="/technology">Technology</a>
<a title="Politics" href="/politics">Politics</a>
<a title="Travel" href="/travel">Travel</a>
</nav>
</header>
<h1>Example Page</h1>
<main>
<p>Check out the great <nav> element.</p>
</main>
</body>
</html>
This document was last updated: