|
Posted by David E. Ross on September 1, 2006, 3:55 pm
Please log in for more thread options
Markus Ernst wrote:
> Hi
>
> Looking for a possibility to get separate tables rendered with common
> column widths, I was surprised to see that this code validates:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <head><title>Table test</title></head>
> <body>
> <table>
> <!-- The first table -->
> <tr>
> <td colspan="3"><h2>Table 1</h2></td>
> </tr>
> <tr>
> <th id="t1_name">Name</th>
> <th id="t1_info">Info</th>
> <th id="t1_price">Price</th>
> </tr>
> <tr>
> <td headers="t1_name">Item name</td>
> <td headers="t1_info">Some info about this item</td>
> <td headers="t1_price">10.30</td>
> </tr>
> <!-- The second table -->
> <tr>
> <td colspan="3"><h2>Table 2</h2></td>
> </tr>
> <tr>
> <th id="t2_name">Name</th>
> <th id="t2_info">Info</th>
> <th id="t2_price">Price</th>
> </tr>
> <tr>
> <td headers="t2_name">Other item name</td>
> <td headers="t2_info">Some info about this other item</td>
> <td headers="t2_price">1255.80</td>
> </tr>
> </table>
> </body>
>
> So separate tables are combined in one, each starting with its own row
> of <th>s. Is this ok, or are there any flaws in it, i.e. regarding
> accessibility?
>
> Thanks for a comment
> Markus
Use CSS to define the column widths.
--
David E. Ross
<http://www.rossde.com/>
Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
|