table-intro-example-001

Introduction to Tables (text-align, font-weight)

WeasyPrint

This browser

Flags
HTMLonly
Assertion
'text-align' and 'font-weight' can be applied to table cells (example from spec section 17.1).

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: Introduction to Tables (text-align, font-weight)</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="HTMLonly">
 8         <meta name="assert" content="'text-align' and 'font-weight' can be applied to table cells (example from spec section 17.1).">
 9           <style type="text/css">
10             caption
11             {
12                 color: blue;
13             }
14             td
15             {
16                 border: 1px solid blue;
17                 height: 5em;
18                 width: 10em;
19             }
20             th
21             {
22                 border: 1px solid blue;
23                 font-weight: bold;
24                 height: 5em;
25                 text-align: center;
26                 width: 10em;
27              }
28         </style>
29     </head>
30     <body>
31         <p>Test passes if the text in the left-most box column is centered in its column and darker than the text in the other columns.</p>
32         <table>
33             <caption>This is a simple 3x3 table</caption>
34             <tr id="row1">
35                 <th>Header 1</th>
36                 <td>Cell 1</td>
37                 <td>Cell 2</td>
38             </tr>
39             <tr id="row2">
40                 <th>Header 2</th>
41                 <td>Cell 3</td>
42                 <td>Cell 4</td>
43             </tr>
44             <tr id="row3">
45                 <th>Header 3</th>
46                 <td>Cell 5</td>
47                 <td>Cell 6</td>
48             </tr>
49         </table>
50     </body>
51  </html>