<thead>

Description

All <table> elements can be divided into three parts: <thead>, <tbody>, and <tfoot>. <thead> contains the rows in the table header. <tbody> contains the rows in the table body. <tfoot> contains the rows in the table footer.

thead>, <tbody>, and <tfoot> elements with the <table> element inform the browser the breakdown of the sections and allows you to apply different styles to the heading, body, and footer.

Example


<html>
<body>
     <table>
          <thead>
               <td>This cell is in the thead rows group.</td>
               <td>This cell is in the thead rows group.</td>
               <td>This cell is in the thead rows group.</td>
          </thead>
          <tbody>
               <tr>
                    <td>This cell is in the tbody rows group.</td>
                    <td>This cell is in the tbody rows group.</td>
                    <td>This cell is in the tbody rows group.</td>
               </tr>
          </tbody>
     </table>
</body><!-- w  w w.j  av a2 s. c o  m-->
</html>

Click to view the demo

The code above generates the following result.

thead




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference