HTML <tr> table row Tag Reference
The tr HTML tag means table row, and defines a row of data within a table
Use it in all tables.
The <tr> HTML/xHTML tag
Every table contains table row <tr> tags. They divide the contents of a table up into rows, which can contain table data cells <td> or table header cells <th>.
When to use the <tr> tag (semantic use)
Use the <tr> tag in all tables. Within the <thead> tag, it should normally contain only <th> tags. Within the <tbody> and <tfoot> tags, it may contain <th> or <td> tags.
Either the table head, body, or foot may contain one or more table rows.
It's valid in all current versions of HTML and xHTML, and it should always have a closing </tr> tag.
Example of <tr> tag use
Here's a table using all the tags, including <thead>, <tbody>, <tfoot>, with both <td> table data cells and <th> table header cells, and also a <caption> for good measure.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>