6 ms·
If you are using <ul> and <li> elements for your links it's one fewer tag in your HTML: <ul class="nav"> <li></li> </ul> vs <nav>
by yeswecan 15y ago
If you are using <ul> and <li> elements for your links it's one fewer tag in your HTML:
<ul class="nav">
<li></li>
</ul>
vs
<nav>
<ul>
<li></li>
</ul>
</nav>
The only 'danger' is that if someone is specifically looking at your page specifically for <nav> tags to locate your navigation they won't find it.
- neovive 15y agoI can definitely see the semantic advantage of the <nav> tag, especially for robots and screen readers. Is there a way to programmatically treat the <nav> tag like a <ul> wihtout using an extra tag?