CSS · Selectors and cascade

!important

Forces a declaration above normal cascade rules. Treat it as a warning sign, not a tool.

Syntax
color: red !important;

Example

Try it

Notes

Fix the specificity instead. Important rules are extremely hard to override later.

More in this group

::after ::before ::placeholder ::selection :active :checked :disabled :empty

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course