Html 5 Tbody Tag

In the html5 <tbody> tag is used to group the html table row content .which tag you must use to inside of <thead> and <tfoot> tag. In the <thead> tag is used to group the header row and <tfoot> tag is used to group the footer row. In the <tfoot> tag you must use before <tbody> tag with in table and also which tag must be inside of <tr> tag and you can put <tbody> tag includes more <tr> tag. Any HTML 4.01 attributes not supported in HTML5.

Syntax:

<table>
  <tbody>
  ---
  </tbody>
</table>

Example Code

<table>
  <thead>
  <tr>
    <th>Car Names</th>
    <th>Price</th>
   </tr>
  </thead>
  <tbody>
  <tr>
    <td>Caballero</td>
    <td>20000</td>
   </tr>
  <tr>
    <td>Defender</td>
    <td>30000</td>
  </tr>
  </tbody>
</table>

Out Put:



Car Names Price
Caballero 223000
Defender 347000

In the above example <tbody> tag has been added to Car Price.





Content