Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css1 / cascade / important.html
blobb57b5d514a814b9ef9451314edad3efad15d0428
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2 <HTML>
3 <HEAD>
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;}
11 P {color: red;}
12 P#id1 {color: purple;}
13 </STYLE>
15 </HEAD>
17 <BODY><P>The style declarations which apply to the text below are:</P>
18 <PRE>P {color: green ! important;}
19 P {color: red;}
20 P#id1 {color: purple;}
22 </PRE>
23 <HR>
24 <P>
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.
26 </P>
27 <P ID="id1">
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.
29 </P>
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.
32 </P>
35 <TABLE border cellspacing="0" cellpadding="3" class="tabletest">
36 <TR>
37 <TD colspan="2" bgcolor="silver"><STRONG>TABLE Testing Section</STRONG></TD>
38 </TR>
39 <TR>
40 <TD bgcolor="silver">&nbsp;</TD>
41 <TD><P>
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.
43 </P>
44 <P ID="id1">
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.
46 </P>
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.
49 </P>
50 </TD></TR></TABLE></BODY>
51 </HTML>