Answer the question
In order to leave comments, you need to log in
How to correctly record according to BEM using the example of a menu?
Hello! I decided to master the BEM methodology, but I don’t understand something completely. As I understand it, the point is to give each tag an individual class.
You can use the example of a simple menu to show how to write correctly in html and css.
For example, there is a code:
<div class="menu">
<ul>
<li><a href=""></a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
</ul>
</div>
Answer the question
In order to leave comments, you need to log in
<nav class="menu">
<ul class="menu__list">
<li class="menu__item menu__item_state_active"><a class="menu__link" href=""></a></li>
<li class="menu__item"><a class="menu__link" href=""></a></li>
<li class="menu__item"><a class="menu__link" href=""></a></li>
</ul>
</nav>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question