!important Declaration
Increases the weight or importance of a particular rule.
Syntax
HTML { sAttribute:sValue!important } Scripting N/A
Possible Values
sAttribute Any cascading style sheets (CSS) attribute. sValue Any of the range of values available to the corresponding attribute. The declaration has no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic properties.
Example
This example includes the !important declaration in the style rule. The color of the text normally would be green, because inline styles overrule the rules set in a style tag. By including the !important declaration in the style rule, the content of the paragraph is instead set to red.
Sample Code
<STYLE> P {color:red!important} </STYLE> <P STYLE="color:green">This will be red.</P>
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.