Click to return to the DHTML, HTML     
@charset Rule     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

!important Declaration


Increases the weight or importance of a particular rule.

Syntax

HTML{ sAttribute:sValue!important }
ScriptingN/A

Possible Values

sAttributeAny cascading style sheets (CSS) attribute.
sValueAny 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 ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
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


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.