CSS Attributes Index Pseudo-class Attributes
Increases the weight or importance of a particular rule.
CSS |
{ sAttribute:sValue!important } |
Script |
N/A |
sAttribute |
Any CSS attribute. |
sValue |
Any of the range of values available to the corresponding attribute. |
The following example illustrates the !important declaration on a style rule. The color of the text would normally be green ( because inline styles overrules the rules set in a STYLE element ). However, because of the !important declaration in the style rule, the paragraph contents will be red.
<style>
P {color:red!important}
</STYLE>
<P STYLE="color:green">This will still be red.</p>
Show me