Name
!important — IE4 Y/N | IE5 Y/Y | NN4 N/N | Op3 Y/-
Synopsis
Style declaration is made important, thereby raising its weight in the cascade. Important declarations override all others. In CSS1, important author styles override all reader styles, even important ones. In CSS2, this is reversed, so that important reader styles always win out over the author’s styles, important or otherwise.
Example
H1 {color: maroon !important;} P.warning {color: rgb(100%,20%,20%) !important; font-weight: bold;}
Values
n/a
Default
n/a
Inherited
yes
Applies to
style rules
Get Cascading Style Sheets: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.