html tbody tag


  Translation results:

英[ˈbɒdi] 美[ˈbɑ:di]

n.Body; corpse; group; object

vt.Give a body

Third person singular: bodies plural : bodies present participle: bodying past tense: bodied past participle: bodied

html tbody tagsyntax

Function:Combines the main content of the HTML table.

Note: tbody element should be used in combination with thead and tfoot elements. If you use thead, tfoot, and tbody elements, you must use all of them. They appear in the order: thead, tfoot, tbody, so that the browser can render the footer before receiving all the data. You must use these tags inside the table element.

Note: These elements will not affect the layout of the table by default. However, you can use CSS to make these elements change the appearance of the table. <thead> must have a <tr> tag inside it! <thead>, <tbody> and <tfoot> are rarely used due to poor browser support.

html tbody tagexample

<html>
<head>
<style type="text/css">
thead {color:green}
tbody {color:blue;height:50px}
tfoot {color:red}
</style>
</head>
<body>

<table border="1">
  <thead>
    <tr>
      <th>Month</th>
      <th>Savings</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>January</td>
      <td>0</td>
    </tr>
    <tr>
      <td>February</td>
      <td></td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td>Sum</td>
      <td>0</td>
    </tr>
  </tfoot>
</table>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Home

Videos

Q&A