HTML & CSS · Middle · Question 36 of 75
In BEM, how do you correctly name the title class inside a card block in its "accent" variant?
- 1
card-title card-title_accent - ✓Correct answer:
card__title card__title--accent - 3
card__title__accent
Explanation
BEM: block (card), element with two underscores (card__title), modifier with two dashes (card__title--accent). The modifier goes together with the base class so base styles aren't duplicated. A flat class structure gives low, uniform specificity and a predictable cascade.