OCXLY
Developer Tools · Free Tool

CSS Specificity Calculator

Type a CSS selector and see its specificity as an (A, B, C) tuple — broken down into the IDs, classes/attributes/pseudo-classes and elements that make it up. Computed live in your browser.

0, 0, 0

How it works

Specificity is scored as three numbers (A, B, C): A counts #id selectors, B counts classes, attribute selectors and pseudo-classes (.class, [type], :hover), and C counts element types and pseudo-elements (div, ::before). The universal selector * and combinators add nothing, and the contents of :not()/:is() are counted by their most specific argument. A higher tuple wins, compared left to right. Computed live in your browser.