Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
/* Specificity: 0-1-1 (1 class + 1 element) */ a:hover { color: blue; } /* :not() takes specificity from its argument */ a:not(.active) { color: grey; } /* 0-1-1 */ a:not(#special) { color: grey; } /* 1-0-1 — ID specificity! */ /* :where() always adds 0 specificity */ :where(h1, h2) { margin: 0; } /* 0-0-0 */
Result
Open