<nav>


HTML <nav> Tag

Instance

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文网(php.cn)</title> 
</head>
<body>

<nav>
<a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
<a href="/js/">JavaScript</a> |
<a href="/jquery/">jQuery</a>
</nav>

</body>
</html>

Run Example»

Click the "Run Instance" button to view the online instance


Browser support

1000.png

##Most browsers currently support the <nav> tag .


Tag definition and usage instructions

<nav> The tag defines the part of the navigation link.

Not all HTML documents need to use the <nav> element. The <nav> element simply serves as an area to mark a navigation link.

On different devices (mobile phone or PC), you can specify whether to display navigation links to adapt to the needs of different screens.


The difference between HTML 4.01 and HTML5

<nav> is the new tag of HTML5.


Global attributes

<nav> tag supports global attributes, see the complete attribute table HTML global attributes.


Event attributes

<nav> tag supports all HTML event attributes.