html-attribute-025

Attribute 'rows' vs CSS 'height' specificity

WeasyPrint

This browser

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

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Attribute 'rows' vs CSS 'height' 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 'rows' has a specificity of zero and is overridden by CSS.">
 9         <style type="text/css">
10             html
11             {
12                 margin: 10px;
13             }
14             html, body, p, table, tr, td
15             {
16                 border: none;
17                 border-spacing: 0;
18                 height: auto;
19             }
20             *
21             {
22                 height: 150px;
23                 border: 1px solid blue;
24                 padding: 0;
25                 margin: 0;
26                 vertical-align: top;
27             }
28             div
29             {
30                 background: orange;
31                 border: none;
32                 height: 152px;
33                 width: 10px;
34             }
35         </style>
36     </head>
37     <body>
38         <p>Test passes if the height of the blue box is the same as the orange bar below.</p>
39         <table>
40             <tr>
41                 <td>
42                     <textarea rows="500" cols="5"></textarea>
43                 </td>
44                 <td>
45                     <div></div>
46                 </td>
47             </tr>
48         </table>
49     </body>
50 </html>