HTML <tbody> Element
The <tbody> element groups the rows that make up the main body of an HTML table. It helps separate the table's primary data from optional header and footer rows.
Syntax
<table>
<tbody>
<tr>
<td>Data</td>
<td>Data</td>
</tr>
</tbody>
</table>
Attributes
The <tbody> element supports the global HTML attributes. It does not have any element-specific attributes.
Example
This example uses <tbody> to group the table's data rows separately from the column headings in <thead>.
Usage Notes
The <tbody> element must be used inside a <table> element. It contains one or more <tr> elements representing rows in the main body of the table.
A table can contain more than one <tbody> element when its data needs to be divided into separate groups. When <thead> or <tfoot> elements are also present, <tbody> provides a clear structural distinction between those sections and the table's main data.
Accessibility
The <tbody> element helps provide meaningful structure to a table, but it does not by itself identify relationships between headers and data cells. Use appropriate <th> elements for row and column headings, and use a <caption> when the table needs a descriptive title.
Browser Support
Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.
For detailed browser compatibility information, see Can I Use: HTML <tbody> Element .
Related Elements
The <tbody> element is used with other table elements, including <table>, <thead>, <tfoot>, <tr>, <th>, and <td>.
Specifications
The <tbody> element is defined in the WHATWG HTML Living Standard .
