table-intro-example-001.xht (1737B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 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="assert" content="'text-align' and 'font-weight' can be applied to table cells (example from spec section 17.1)." /> 8 <style type="text/css"> 9 caption 10 { 11 color: blue; 12 } 13 td 14 { 15 border: 1px solid blue; 16 height: 5em; 17 width: 10em; 18 } 19 th 20 { 21 border: 1px solid blue; 22 font-weight: bold; 23 height: 5em; 24 text-align: center; 25 width: 10em; 26 } 27 </style> 28 </head> 29 <body> 30 <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> 31 <table> 32 <caption>This is a simple 3x3 table</caption> 33 <tr id="row1"> 34 <th>Header 1</th> 35 <td>Cell 1</td> 36 <td>Cell 2</td> 37 </tr> 38 <tr id="row2"> 39 <th>Header 2</th> 40 <td>Cell 3</td> 41 <td>Cell 4</td> 42 </tr> 43 <tr id="row3"> 44 <th>Header 3</th> 45 <td>Cell 5</td> 46 <td>Cell 6</td> 47 </tr> 48 </table> 49 </body> 50 </html>