A set of navigation links:
<nav>
<a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
<a href="/js/">JavaScript</a> |
<a href="/python/">Python</a>
</nav>
Try it Yourself »
The <nav>
tag defines a set of navigation links.
Notice that NOT all links of a document should be inside a <nav>
element. The <nav>
element is intended only for major blocks of navigation links.
Browsers, such as screen readers for disabled users, can use this element to determine whether to omit the initial rendering of this content.
The numbers in the table specify the first browser version that fully supports the element.
Element | |||||
---|---|---|---|---|---|
<nav> | 5.0 | 9.0 | 4.0 | 5.0 | 11.1 |
The <nav>
tag also supports the Global Attributes in HTML.
The <nav>
tag also supports the Event Attributes in HTML.
HTML DOM reference: Nav Object
Most browsers will display the <nav>
element with the following default values:
nav {
display: block;
}
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!