table-intro-example-004.xht (1535B)
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 (caption-side)</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="'caption-side' can be set on a table caption (example from section 17.1)." /> 8 <style type="text/css"> 9 caption 10 { 11 color: blue; 12 caption-side: top; 13 } 14 td 15 { 16 border: solid black; 17 } 18 th 19 { 20 border: solid black; 21 } 22 </style> 23 </head> 24 <body> 25 <p>Test passes if blue text (with the words 'This is a simple 3x3 table') appears above the three-by-three grid below.</p> 26 <table> 27 <caption>This is a simple 3x3 table</caption> 28 <tr id="row1"> 29 <th>Header 1</th> 30 <td>Cell 1</td> 31 <td>Cell 2</td> 32 </tr> 33 <tr id="row2"> 34 <th>Header 2</th> 35 <td>Cell 3</td> 36 <td>Cell 4</td> 37 </tr> 38 <tr id="row3"> 39 <th>Header 3</th> 40 <td>Cell 5</td> 41 <td>Cell 6</td> 42 </tr> 43 </table> 44 </body> 45 </html>