1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
4 <TITLE>CSS1 Test Suite:
3.1 important
</TITLE>
5 <META http-equiv=
"Content-Type" content=
"text/html; charset=iso-8859-1">
6 <META http-equiv=
"Content-Style-Type" content=
"text/css">
8 <LINK rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"../resources/base.css">
9 <STYLE type=
"text/css">
10 P {color: green ! important;}
12 P#id1 {color: purple;}
17 <BODY><P>The style declarations which apply to the text below are:
</P>
18 <PRE>P {color: green ! important;}
20 P#id1 {color: purple;}
25 This sentence 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.
28 This sentence should also be green, even though it has an ID of
<TT>id1
</TT>, which would ordinarily make it purple. This is because declarations marked important have more weight than normal declarations given in a STYLE attribute.
30 <P style=
"color: red;">
31 This sentence 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.
35 <TABLE border
cellspacing=
"0" cellpadding=
"3" class=
"tabletest">
37 <TD colspan=
"2" bgcolor=
"silver"><STRONG>TABLE Testing Section
</STRONG></TD>
40 <TD bgcolor=
"silver"> </TD>
42 This sentence 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.
45 This sentence should also be green, even though it has an ID of
<TT>id1
</TT>, which would ordinarily make it purple. This is because declarations marked important have more weight than normal declarations given in a STYLE attribute.
47 <P style=
"color: red;">
48 This sentence 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.
50 </TD></TR></TABLE></BODY>