Home > Web Front-end > HTML Tutorial > How to use nav tag properly in html5?

How to use nav tag properly in html5?

黄舟
Release: 2017-06-29 14:23:41
Original
3070 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:
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
Latest Issues
html5 validation for symfony 2.1
From 1970-01-01 08:00:00
0
0
0
The difference between HTML and HTML5
From 1970-01-01 08:00:00
0
0
0
html5 show hide
From 1970-01-01 08:00:00
0
0
0
Can PDF files run HTML5 and Javascript?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template