default-attribute-selector-005

attribute selector - Default attribute values in DTDs

WeasyPrint

This browser

Assertion
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.

Source

 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   a {background-color: green;}
16   a[shape] {background-color: red;}
17   a[shape="rect"] {background-color: green;}
18   </style>
19 
20  </head>
21 
22  <body>
23 
24   <p>Test passes if there is a green stripe and <strong>no red</strong></p>
25 
26   <p><a>&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
27   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</a></p>
28 
29  </body>
30 </html>