background-html-body-001

Background on html and body element

WeasyPrint

This browser

Flags
HTMLonly
Assertion
Background of the html element is the canvas's background even if body background is set.

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: Background on html and body element</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties">
 7         <meta name="flags" content="HTMLonly">
 8         <meta name="assert" content="Background of the html element is the canvas's background even if body background is set.">
 9         <style type="text/css">
10             html
11             {
12                 background: green;
13             }
14             body
15             {
16                 background: blue;
17             }
18         </style>
19     </head>
20     <body>
21          <p>Test passes if the background of the entire page is green and there is a blue box on the page.</p>
22     </body>
23 </html>