CSS1 Test Suite: 3.1 important


[Previous] [Next] [Section] [Contents] [Specification]

The style declarations which apply to the text below are:

P {color: green ! important;}
P {color: red;}
P#id1 {color: purple;}


This paragraph should be green, because the declaration marked important should override any other normal declaration for the same element, even if it occurs later in the stylesheet.

This paragraph should also be green, even though it has an ID of id1, which would ordinarily make it purple. This is because declarations marked important have more weight than delcarations which use ID selectors.

This paragraph should also be green, even though it has a STYLE attribute declaring it to be red. This is because declarations marked important have more weight than normal declarations given in a STYLE attribute.

TABLE Testing Section
 

This paragraph should be green, because the declaration marked important should override any other normal declaration for the same element, even if it occurs later in the stylesheet.

This paragraph should also be green, even though it has an ID of id1, which would ordinarily make it purple. This is because declarations marked important have more weight than delcarations which use ID selectors.

This paragraph should also be green, even though it has a STYLE attribute declaring it to be red. This is because declarations marked important have more weight than normal declarations given in a STYLE attribute.


[Previous] [Next] [Section] [Contents] [Specification]