HTML <tbody> table body Tag Reference
The tbody HTML tag means table body, and contains the rows of data that make up a table.
Use it in all tables as a rule, but especially if your table contains a <thead> and/or <tfoot>.
The <tbody> HTML/xHTML tag
<tbody> is an optional tag, but it's good practice to include it in all tables, and you should definitely use it if your table has a header or footer, to differentiate the table data from the column headers and footers. A table may contain more than one <tbody> tag.
When to use the <tbody> tag (semantic use)
The <tbody> tag lies within the <table> tag. If your table contains a header and a footer, then the correct order is <thead> <tfoot> <tbody>
It's valid in all current versions of HTML and xHTML, and it should always have a closing </tbody> tag.
Example of <tbody> tag use
The <tbody> goes after the first <thead> but also after the <tfoot> tag (which is unusual, but the way it is).
Looks like...
| ID | Product | Unit price | Units ordered | Total |
|---|---|---|---|---|
| Total price | £10.85 | |||
| 1 | Coffee | £1.50 | 3 | £4.50 |
| 2 | Turnips | £0.90/kg | 4 | £3.60 |
| 3 | Rat's tails | £0.25 / 6 | 11 | £2.75 |
(Note, we've added styles to this table.)




<thead>
<th>Product</th>
<th>Unit price</th>
<th>Units ordered</th>
<th>Total</th>
<tfoot>
<td>£10.85 </td>
<tbody>
<td>Coffee</td>
<td>£1.50</td>
<td>3</td>
<td>£4.50</td>
<tr>
<td>Turnips</td>
<td>£0.90/kg</td>
<td>4</td>
<td>£3.60</td>
<tr>
<td>Rat's tails</td>
<td>£0.25 / 6</td>
<td>11</td>
<td>£2.75</td>