table-columns-example-001

Table columns - Emulating the HTML table 'rules' attribute on columns

WeasyPrint

This browser

Assertion
CSS can be used to emmulate the HTML 'rules = cols' attribute (example from section 17.3).

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 columns - Emulating the HTML table 'rules' attribute on columns</title>
 5         <link rel="author" title="W3C" href="http://www.w3c.org">
 6         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#columns">
 8         <meta name="flags" content="">
 9         <meta name="assert" content="CSS can be used to emmulate the HTML 'rules = cols' attribute (example from section 17.3).">
10         <style type="text/css">
11             .t1
12             {
13                 border-collapse: collapse;
14                 border-style: hidden;
15             }
16             .col1
17             {
18                 border-style: none solid;
19             }
20             td
21             {
22                 height: 2em;
23                 width: 2em;
24             }
25         </style>
26     </head>
27     <body>
28         <table class="t1">
29             <col class="col1">
30             <col class="col1">
31             <col class="col1">
32             <tr>
33                 <td></td>
34                 <td></td>
35                 <td></td>
36             </tr>
37             <tr>
38                 <td></td>
39                 <td></td>
40                 <td></td>
41             </tr>
42             <tr>
43                 <td></td>
44                 <td></td>
45                 <td></td>
46             </tr>
47         </table>
48         <p>Test passes if the vertical lines above this text match the vertical lines below this text (differing only in boldness).</p>
49         <table rules="cols">
50             <tr>
51                 <td></td>
52                 <td></td>
53                 <td></td>
54             </tr>
55             <tr>
56                 <td></td>
57                 <td></td>
58                 <td></td>
59             </tr>
60             <tr>
61                 <td></td>
62                 <td></td>
63                 <td></td>
64             </tr>
65         </table>
66     </body>
67 </html>