How to use nav tag properly in html5?

黄舟
Release: 2017-06-29 14:23:41
Original
2993 people have browsed it

html5Is it reasonable to use the nav tag in this way?

<nav>
<li><a href="#">1111111111111</a></li>
<li><a href="#">222222222</a></li>
<li><a href="#">333333333333</a></li>
<li><a href="#">44444444</a></li>
</nav>
Copy after login

Can the nav tag in hmtl5 be used as above? Is it reasonable to use it this way? Please give advice.

It should be like this

<nav>
  <ul>
    <li><a href="#">1111111111111</a></li>
    <li><a href="#">222222222</a></li>
    <li><a href="#">333333333333</a></li>
    <li><a href="#">44444444</a></li>
  </ul>
</nav>
Copy after login

Why do you have to add UL? I think if you use UL, otherthe outer nav can be omitted. This does not belong More code? Is it necessary to write so many layers? If it doesn't have that effect, a label will do.

If you say that ul can be removed, then the code you used to write can be written as follows

<div>
  <li></li>
  <li></li>
</div>
Copy after login

First, the structure of the list is like this:

If there is no ul, is it still called a list?

The above is the detailed content of How to use nav tag properly in html5?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!