table-header-group-003

Table header group and top captions

WeasyPrint

This browser

Assertion
A table-header-group element is placed after any top captions.

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: Table header group and top captions</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#table-display">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="A table-header-group element is placed after any top captions.">
 9         <style type="text/css">
10             .table
11             {
12                 display: table;
13             }
14             .caption
15             {
16                 border: 1px solid black;
17                 background: orange;
18                 caption-side: top;
19                 color: orange;
20                 display: table-caption;
21                 height: 4em;
22                 width: 4em;
23             }
24             #thead
25             {
26                 display: table-header-group;
27                 background: blue;
28             }
29             #tbody
30             {
31                 display: table-row-group;
32                 background: orange;
33             }
34             .tr
35             {
36                 display: table-row;
37             }
38             .td
39             {
40                 display: table-cell;
41                 border: 1px solid black;
42                 height: 4em;
43                 width: 4em;
44             }
45         </style>
46     </head>
47     <body>
48         <p>Test passes if the blue square below is stacked beneath either one or two orange squares and has one orange square underneath it.</p>
49         <div class="table">
50             <div id="tbody">
51                 <div class="tr">
52                      <div class="td"></div>
53                 </div>
54             </div>
55             <div id="thead">
56                 <div class="tr">
57                      <div class="td"></div>
58                 </div>
59             </div>
60             <div class="caption"></div>
61             <div class="caption"></div>
62         </div>
63     </body>
64 </html>