In the BEM approach, if you have a block named "menu" and an element inside it named "item", how would you represent it using a class?
- .menu .item
- .menu item
- .menu-item
- .menu_item
In the BEM (Block Element Modifier) methodology, elements are represented with a single hyphen - connecting the block and element names. Therefore, the correct way to represent an element named "item" inside a block named "menu" is by using the class .menu-item.
Loading...
Related Quiz
- How would you define a custom property (or variable) in CSS?
- You have an element with a complicated graphical background, and you want certain parts of the foreground content to reveal or hide portions of this background. Which CSS technique would be most appropriate to achieve this?
- How do you define the number of columns in a grid layout?
- Which property is used to span multiple rows or columns in a grid layout?
- In the BEM methodology, how is a modifier typically represented in a class name?