Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

!important

Increases the weight or importance of a particular declaration.

{ sRule!important }

sRule

Any CSS attribute/value pair.

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>

Community Additions

ADD
Show:
© 2015 Microsoft