anonymous-box-generation-001

Anonymous block box generation

WeasyPrint

This browser

Assertion
Block boxes with inline content followed by a block box generate an anonymous block box around the inline content.

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: Anonymous block box generation</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Block boxes with inline content followed by a block box generate an anonymous block box around the inline content.">
 9         <style type="text/css">
10             div
11             {
12                 width: 2in;
13             }
14             #div1
15             {
16                 text-align: center;
17             }
18             div div
19             {
20                 background: blue;
21                 height: 1em;
22             }
23         </style>
24     </head>
25     <body>
26         <p>Test passes if the "Filler Text" text is centered above the blue box.</p>
27         <div id="div1">
28             Filler Text
29             <div></div>
30         </div>
31     </body>
32 </html>