HTML-Lesson 10

Tables 3

Even more Table Tags

The tags 'thead', 'tfoot' and 'tbody' can be used to enclose heading rows, table footer rows and the remaining body of data cells. E.G:

<table><thead><tr>
<th>
Column 1 </th>
<th>
Column 2 </th>
</tr></thead><tfoot><tr>
<td colspan="2">
The End </td>
</tr></tfoot><tbody><tr>
<td>
cell 1,1 </td>
<td>
cell 2,1 </td>
</tr><tr>
<td>
cell 1,2 </td>
<td>
cell 2,2 </td>
</tr><tr>
<td>
cell 1,3 </td>
<td>
cell 2,3 </td>
</tr></tbody></table>

This code results in the table.

Column 1 Column 2
The End
cell 1,1 cell 2,1
cell 1,2 cell 2,2
cell 1,3 cell 2,3

NOTE that 'thead', 'tfoot' and 'tbody' must appear in this order.

Previous Lesson previous lesson next lesson Next Lesson