Increases the weight or importance of a particular declaration.
Syntax
HTML |
{ sRule!important } |
---|
Scripting | N/A |
---|
Possible Values
sRule | Any CSS attribute/value pair. |
Example
The following example includes an !important declaration in the style rule. Normally the color of the text would be red, because inline styles override the rules set in a style tag. By including the !important declaration in the style rule, you set the content of the paragraph to green.
<STYLE>
P { color:green!important }
</STYLE>
<P STYLE="color:red">This text will be green.</P>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Standards Information
This declaration is defined in
Cascading Style Sheets (CSS), Level 1 (CSS1) .