# 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.

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

Level: Novice · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/novice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/specificity
