line-height-normal-recommendation-001

Line-height recommended 'normal' value

WeasyPrint

This browser

Flags
ahem, should
Assertion
It is recommended that the 'normal' value for 'line-height' is set to 1.0 or 1.2 'em' units.

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: Line-height recommended 'normal' value</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading">
 8         <meta name="flags" content="ahem should">
 9         <meta name="assert" content="It is recommended that the 'normal' value for 'line-height' is set to 1.0 or 1.2 'em' units.">
10         <style type="text/css">
11             div
12             {
13                 font: 1in Ahem;
14             }
15             #div1
16             {
17                 position: relative;
18             }
19             div div
20             {
21                 position: absolute;
22                 top: 0;
23             }
24             #div2
25             {
26                 height: 1em;
27                 left: 0;
28                 width: 1in;
29             }
30             #div3
31             {
32                 background: blue;
33                 display: block;
34                 left: 1in;
35                 position: absolute;
36                 width: 1in;
37             }
38             #div4
39             {
40                 height: 1.2em;
41                 left: 2in;
42                 width: 1in;
43             }
44             #div2, #div4
45             {
46                 background: orange;
47             }
48         </style>
49     </head>
50     <body>
51         <p>Test passes if there is a blue box below. It is recommended that the blue box is the same height as one of the orange boxes but it is not required.</p>
52         <div id="div1">
53             <div id="div2"></div>
54             <div id="div3">&nbsp;</div>
55             <div id="div4"></div>
56         </div>
57     </body>
58 </html>