Skip to content
engineering workbench.by StudyPort Academy
All glossary terms

GLOSSARY · A WORD, UNPACKED

specificity

the cascade weight of a selector, used when two declarations target the same property.

A little more detail

Compare selectors by counting ids, then classes, attributes, and pseudo-classes, then elements and pseudo-elements. A single id outweighs any number of classes. If specificity ties, source order decides. !important changes importance, which is considered before specificity, and it is hard to undo.

See it in practice

These lessons pair the idea with examples you can change and run.