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?

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.

Further reading

Problem with a question

HTML & CSS · Middle · question 36

Test yourself

Take the HTML & CSS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz