!important Declaration

DHTML, HTML, & CSS

 
Click to return to the DHTML, HTML & CSS home page    
@charset Rule     DHTML Properties    

!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 propertiesInternet Link.

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:
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

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.