←
🏠 Home CSS specificity cheatsheet
CSS specificity is one of the stages of the Cascade algorithm to help resolve conflicting style rules.
Cascade algorithm
- Position & order of appearance
- Specificity
- Origin
- Importance
Specificity
| Item | Point |
|---|---|
| Universal selector | 0 |
| Element, pseudo-element | 1 |
| Class, pseudo-class/attribute | 10 |
| Id | 100 |
| Inline style | 1000 |
| !important rule | 10000 |