All tools

developer

CSS Specificity Calculator

Paste CSS selectors and compute their specificity as (ID, Class, Element) — handles :is(), :not(), :where(), attributes, and pseudo-elements.

SelectorScoreWeight
#header .nav a:hover1,2,1121
.card > .title0,2,020
ul li a0,0,33
.btn.btn-primary0,2,020
*0,0,00

Specificity is expressed as three counters: IDs, classes/attributes/pseudo-classes, and elements/pseudo-elements. Higher IDs beat any number of classes; higher classes beat any number of elements.