Share via


!important

Increases the weight or importance of a particular declaration.

Syntax

{ sRule**!important** }

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 color of the content of the paragraph to green:

<style>
    p {color:green!important}
</style>
<p style="color:red">This text will be green.</p>

Standards information

This declaration is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Ee371209.xtlink_newWindow(en-us,Expression.40).png.

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.