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>
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>
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>
First, the structure of the list is like this:
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!