1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5
6 <title>CSS Test: attribute selector - Default attribute values in DTDs</title>
7
8 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
9 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#default-attrs">
10 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#matching-attrs">
11 <meta content="" name="flags">
12 <meta content="Default attribute values may be declared in an external resource such as a DTD. In such case, the default attributes may or may not appear in the document tree. When default attributes appear in the document tree, then their correspondent default values must be included." name="assert">
13
14 <style type="text/css">
15 td
16 {
17 background-color: green;
18 height: 100px;
19 width: 100px;
20 }
21
22 td[rowspan] {background-color: red;}
23
24 td[rowspan="1"] {background-color: green;}
25 </style>
26
27 </head>
28
29 <body>
30
31 <p>Test passes if there is a green square and <strong>no red</strong></p>
32
33 <table>
34 <tr>
35 <td></td>
36 </tr>
37 </table>
38
39 </body>
40 </html>