html-attribute-001

Attribute 'align' vs. CSS 'caption-side' specificity

WeasyPrint

This browser

Assertion
Attribute 'align' has a specificity of zero and is overridden by CSS.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Attribute 'align' vs. CSS 'caption-side' specificity</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Attribute 'align' has a specificity of zero and is overridden by CSS.">
 9         <style type="text/css">
10             div
11             {
12                 border: 1px solid black;
13                 float: left;
14             }
15             table
16             {
17                 width: 300px;
18             }
19             *
20             {
21                 caption-side: bottom;
22             }
23         </style>
24     </head>
25     <body>
26         <p>Test passes if the word "Bottom" is centered inside the black box and is below the word "Top".</p>
27         <div>
28             <table>
29                 <caption align="right">Bottom</caption>
30                 <tr>
31                     <td>Top</td>
32                 </tr>
33             </table>
34         </div>
35     </body>
36 </html>