Home > Abakada: Back to Basics > Language References > HTML Elements > TBODY Element
Designates rows as the body of the table. | HTML 4, 4.01, 5 |
HTML Syntax
<tbody
align = center | left | right
bgcolor = color
class = classname
id = value
style = css_style_rules
title = text
valign = baseline | bottom | center | middle | top
>
This element is exposed for all tables, even if the table did not explicitly define a TBODY element.
This element is a block element.
A <tbody
> element’s start tag can be omitted if the first thing inside the <tbody
> element is a <tr
> element, and if the element is not immediately preceded by a <tbody
>, <thead
>, or <tfoot
> element whose end tag has been omitted.
A <tbody
> element’s end tag can be omitted if the <tbody
> element is immediately followed by a <tbody
> or <tfoot
> element, or if there is no more content in the parent element.
The <tbody>
element has no attribute of its own, but supports global attributes common to all HTML elements.
This example shows a two-row table. The first row is in the table head. The second row is in the table body.
<table>
<thead>
<tr>
<td>This text is in the THEAD</td>
</tr>
<tbody>
<tr>
<td>This text is in the TBODY</td>
</tr>
</tbody>
</table>
TFOOT THEAD