data-alignment-004

Aligning Table Data (column data is aligned)

WeasyPrint

This browser

Assertion
Alignment of cell data in a column is achieved by specifying alignment properties on the cells themselves, and not on the column element directly.

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: Aligning Table Data (column data is aligned)</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#tables-intro">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Alignment of cell data in a column is achieved by specifying alignment properties on the cells themselves, and not on the column element directly.">
 9         <style type="text/css">
10             col
11             {
12                 text-align: center;
13                 vertical-align: middle;
14             }
15             td
16             {
17                 border: solid;
18                 height: 10em;
19                 text-align: left;
20                 vertical-align: top;
21                 width: 10em;
22             }
23         </style>
24     </head>
25     <body>
26         <p>Test passes if the "Filler Text" is in the top-left corner of each of the boxes below.</p>
27         <table>
28             <col>
29             <tr>
30                 <td>Filler Text</td>
31             </tr>
32             <tr>
33                 <td>Filler Text</td>
34             </tr>
35             <tr>
36                 <td>Filler Text</td>
37             </tr>
38         </table>
39     </body>
40  </html>