The tbody tag
The tbody tag defines the main part of the table. It is used to group rows so that CSS styles can be applied to a group at once. There can be any number of tbody tags in one table.
The tbody tag is often used together with thead and tfoot to define the header, body, and footer of an HTML table. By default, the browser will put the contents of tfoot at the foot of the table, and thead at the top.
Example
Let's add red text color to the group of rows united by the tbody tag using the color property:
<table>
<thead>
<tr>
<th>Name</th>
<th>Surn</th>
<th>Salary</th>
</tr>
</thead>
<tbody>
<tr>
<td>name1</td>
<td>surn1</td>
<td>200$</td>
</tr>
<tr>
<td>name2</td>
<td>surn2</td>
<td>1000$</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>count: 2</td>
<td>-</td>
<td>total: 1200$</td>
</tr>
</tfoot>
</table>
tbody {
color: red;
}
table, td, th {
border: 1px solid black;
}
: