<tbody> tag
What exactly is the point of the tag? Can one table consist of more than one pair of these tags?
cscgal
The Queen of DaniWeb
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
My question is whether it is legal to do:
<table>
<thead>
<tr><td>Heading</td></tr>
</thead>
<tbody>
<tr><td>Body 1</td></tr>
</tbody>
<tbody>
<tr><td>Body 2</td></tr>
</tbody>
</table>
cscgal
The Queen of DaniWeb
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
Oh cool! Thanks. Definitely answers my question.
cscgal
The Queen of DaniWeb
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
This is not quite right.
The purpose of tbody is to go with thead and tfoot to make a table that has a header and footer that are always visible when the table is larger than a page.
If you use tbody, you also need to use thead and tfoot, and they must be placed in the following order:
<table>
<thead>
<tr>
<th>stuff 1</th><th>stuff 2</th>
</tr>
</thead>
<tfoot>
<tr>
<th>stuff 1</th><th>stuff 2</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>stuff 1</td><td>stuff 2</td>
</tr>
</tbody>
</table>
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182