Specificity

How precise a selector is; the more specific rule wins.

What is specificity?

Specificity is how precise a selector is. When rules clash, the more specific one wins: an id beats a class, and a class beats a tag name.

p { color: black; }
.intro { color: blue; }   /* wins over p: a class is more specific */

Level: Novice · More CSS terms at this level

Updated