Answer the question
In order to leave comments, you need to log in
Is there an objective reason to use ul li inside a menu?
Is there an objective reason to use ul li inside a menu?
Option number 1:
<nav class="menu">
<div class="menu__item"><a class="menu__link" href="#">Menu Item</a></div>
<div class="menu__item"><a class="menu__link" href="#">Menu Item</a></div>
<div class="menu__item"><a class="menu__link" href="#">Menu Item</a></div>
</nav>
<nav class="menu">
<ul class="menu__list">
<li class="menu__item"><a class="menu__link" href="#">Menu Item</a></li>
<li class="menu__item"><a class="menu__link" href="#">Menu Item</a></li>
<li class="menu__item"><a class="menu__link" href="#">Menu Item</a></li>
</ul>
</nav>
Answer the question
In order to leave comments, you need to log in
Availability. Here is an interesting video about it: https://youtu.be/KAK-WAb9vow
Of course I have. Menu is a list of links, ul is a tag for the list.
If you forget about this, then in the first version you can <nav>
replace it with <div>
. Then <a>
replace with <div>
, and write the click handling in js.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question