asp.net.ph

Skip Navigation Links

!important Declaration

CSS Attributes Index   Pseudo-class Attributes


Increases the weight or importance of a particular rule.

Syntax


CSS { sAttribute:sValue!important }
Script N/A

Possible Values


sAttribute Any CSS attribute.
sValue Any of the range of values available to the corresponding attribute.

Example

The following example illustrates the !important declaration on a style rule. The color of the text would normally be green ( because inline styles overrules the rules set in a STYLE element ). However, because of the !important declaration in the style rule, the paragraph contents will be red.

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

 Show me 



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note