HTML » Tags » tbody

Version: 4.0

Compability: Explorer 4, 5  Netscape 6

<tbody> ... </tbody>

The <tbody> tag is one of three new version 4.0 tags that divide a table into three distinct sections.

The tbody tag defines the body portion where the data is displayed, the thead tag defines the header section, and the tfoot tag defines the footnote section of the table. The purpose of this division is to allow scrolling through the body of a large table while both the header and footnote portions remain visible.
Unfortunately, no browser truly implements these three new tags.
The closing tag is optional. However, it is recommended that it always be included.


<table border="1">
thead, tfoot & tbody
<tr><th>Header 1</th><th>Header 2</th></tr>
<tr><td colspan="2">footnote</td></tr>
<tr><td>data cell 1</td><td>data cell 2</td><tr>
thead, tfoot & tbody
Header 1Header 2
data cell 1data cell 2

Note the the correct order for using these tags is thead, then tfoot, and last tbody.

Language(s): HTML

See Also: