Code Editor
Web Browser

In the last exercise, the table's headings were kept inside of the table's body. When a table's body is sectioned off, however, it also makes sense to section off the table's headings using the <thead> element.

<table> <thead> <tr> <th></th> <th>Saturday</th> <th>Sunday</th> </tr> </thead> <tbody> <tr> <th>Morning</th> <td rowspan="2">Work</td> <td rowspan="3">Relax</td> </tr> <tr> <th>Afternoon</th> </tr> <tr> <th>Evening</th> <td>Dinner</td> </tr> </tbody> </table>

In the example above, the only new element is <thead>. The table headings are contained inside of this element. Note that the table's head still requires a row in order to contain the table headings.

Report a Bug
If you see a bug or any other issue with this page, please report it here.