HTML <tbody> tag

Usage

Specifies a table body section. The body will appear in the middle of the table, below the table header (thead), and above the table footer (tfoot). If the table is long, the table body section will scroll. Note that these three elements can be specified in any order within the HTML code, and they will still be assembled in the correct order.

Example

Code:

<table border="1">

<thead>
<tr>
<td>This is the table header</td>
</tr>
</thead>

<tfoot>
<tr>
<td>This is the table footer</td>
</tr>
</tfoot>

<tbody>
<tr>
<td>This is the table body</td>
</tr>
</tbody>

</table>

Output:

This is the table header
This is the table footer
This is the table body

Required Attributes

  • none

Optional Attributes

  • align - left, right, center, justify, char - the horizontal alignment of the cell data
  • char - specifies the character that the text should be aligned around; not supported by many browsers
  • charoff - the number of pixels to offset the alignment by; again not supported by many browsers
  • valign - vertical alignment of the text

Core Attributes