CSS

Specificity

The weight deciding which rule wins: element < class < id < inline, with !important above all.

Why interviewers ask about it

Reaching for !important usually signals a specificity problem rather than solving one. Methodologies like BEM exist to keep specificity flat.

This term is part of the free Python Full-Stack interview preparation module - browse the full glossary for every definition.