BEM naming

A naming system for CSS classes: block__element--modifier.

Also called: block element modifier, class naming

Domain
Languages
Type
Term
Source
General
Language
CSS

Example

With BEM names like card__title, it is clear which component a style belongs to.

In code

.card {}
.card__title {}
.card--featured {}

It keeps specificity low and makes it obvious which class belongs to which component.

Learn more

Related terms

Added 2026-11-30 · Last reviewed 2026-11-30