Definition and Usage.
The <tbody> tag is used to group the body content in an HTML table.
The tbody element should be used in conjunction with the thead and tfoot elements.
The thead element is used to group the header content in an HTML table and the tfoot element is used to group the footer content in an HTML table.
Notice that these elements will not affect the layout of the table by default. However, you can use CSS to let these elements affect the table's layout.
Example.
<html>
<body>
<table border="1">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
</table>
</body>
</html>
No response to “Use of TBODY Tag.”
Post a Comment