Answer the question
In order to leave comments, you need to log in
Why is a list better than a div block?
Hello. Often in the layout I see how they use such a construction in the menu. It doesn't matter if it's a horizontal menu or a vertical one.
<ul class="menu">
<li>Главная</li>
<li>Новости</li>
<li>Блог</li>
</ul>
<div class="menu">
<div>Главная</div>
<div>Новости</div>
<div>Блог</div>
</div>
<div class="menu">
<a>Главная</a>
<a>Новости</a>
<a>Блок</a>
</div>
Answer the question
In order to leave comments, you need to log in
For accessibility. In order for the blind to understand that there is a list of such and such a number of links in front of him, it is even better to shove the list with navigation links into the nav tag.
This is done for the readability of the code and for search engines this is a plus. Lists are more meaningful to the search engine than divs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question