CSS Specificity Calculator

Analyze CSS selector weights instantly and break down specificity values into the standard (A, B, C) format.

0
IDs (A)
,
1
Classes/Attrs/Pseudo (B)
,
3
Elements/Pseudo-elems (C)
Specificity: 0, 1, 3

Specificity Hierarchy Reference

1. IDs (A)

Count of ID selectors (e.g., #nav). They carry the highest weight short of inline styles.

2. Classes, Attributes & Pseudo-classes (B)

Count of class selectors (.class), attribute selectors ([type="text"]), and pseudo-classes (:hover).

3. Elements & Pseudo-elements (C)

Count of type/element selectors (div, p) and pseudo-elements (::before).

Web hosting by Somee.com