The <nav> element marks a navigation section.
<nav> |
Yes | 9.0 | Yes | Yes | Yes |
The <nav> tag is new in HTML5.
The <nav> tag supports the Global Attributes in HTML.
The <nav> tag supports the Event Attributes in HTML.
nav { display: block; }
<!DOCTYPE HTML>
<html>
<body>
<header>
<nav>
<h1>H1</h1>
<ul>
<ul>
<li><a href="#">A</a></li>
<ul>
<li><a href="#">B</a></li>
</ul>
<li><a href="#">C</a></li>
<ul>
<li><a href="#">D</a></li>
<li><a href="#">E</a></li>
</ul>
</ul>
</nav>
</header> <!--from w w w . j av a 2s. c om-->
</body>
</html>