Are table headers only for the top row in html?

Posted by Bill Zimmerman on Stack Overflow See other posts from Stack Overflow or by Bill Zimmerman
Published on 2010-05-01T13:23:14Z Indexed on 2010/05/01 13:27 UTC
Read the original article Hit count: 225

Filed under:
|
|

Hi,

I always see the th tag only used in the first row of the table. Is there some specific reason why it can't be used to create 'left' headers along the leftmost column. Is this bad form, or is this ok.

Basically, a table with headings on the top row and the leftmost column, with the very top left square being empty.

e.g.

<table>
    <tr>
        <th/> <!--empty-->
        <th>Top 1</th>
        <th>Top 2</th></tr>
    <tr>
        <th>LeftHeader?</th>
        <td>data1</td>    
        <td>data2</td></tr>
</table>

© Stack Overflow or respective owner

Related posts about html

Related posts about tables