html-attribute-019

Attribute 'vspace' vs. CSS 'margin' specificity

WeasyPrint

This browser

Flags
image
Assertion
Attribute 'vspace' 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 'vspace' vs. CSS 'margin' 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="image">
 8         <meta name="assert" content="Attribute 'vspace' has a specificity of zero and is overridden by CSS.">
 9         <style type="text/css">
10             div
11             {
12                 font: 16px/15px serif;
13             }
14             img
15             {
16                 vertical-align: bottom; /* images must sit at bottom of line box, not on the baseline */
17             }
18             div *
19             {
20                 margin: 0px;
21             }
22         </style>
23     </head>
24     <body>
25         <p>Test passes if there is no space between the green and blue boxes below.</p>
26         <div><img vspace="200" alt="15x15 blue box" src="support/blue15x15.png"></div>
27         <div><img alt="15x15 green box" src="support/green15x15.png"></div>
28     </body>
29 </html>