In HTML5, the nav tag is a navigation tag; the full name of nav is navigation, which means navigation. This tag defines the part of the navigation link and is used to represent the navigation in the HTML page. This tag is not all HTML It must be used in all documents, just as an area to mark a navigation link.
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
Not all HTML documents need to use the
On different devices (mobile phone or PC), you can specify whether to display navigation links to adapt to the needs of different screens.
Nav elements can be used as link groups for page navigation. There are many links in the navigation link group. Clicking on each link can link to other pages or other parts of the current page. Not all link groups are To be placed inside the nav element, we only need to put the most important, basic and important things inside the nav element.
For example, if there is a copyright statement at the bottom of the footer, we do not recommend using the nav element. Instead, it is most appropriate to use the footer element. In a page, we can use multiple nav elements as navigation as a whole or different parts
Usage of nav elements
<body> <h1>nav的使用方法</h1> <nav> <ul> <li> <a href=”nav元素.html”>首页</a> </li> <li> <a href=”aside元素.html”>aside</a> </li> <li> <a href=”section元素.html”>section</a> </li> </ul> </nav> </body>
Output results:
(Learning video sharing: css video tutorial, html video tutorial)
The above is the detailed content of What is navigation tag in HTML5. For more information, please follow other related articles on the PHP Chinese website!