Html 5 Th Tag

In the html5 <th> tag is used to header box in the html table. Which tag must be inside of <tr> tag. In the html table have two type of cells first one is header cells and second one is standard cells. If you create header cell use <th> tag and if you create standard cell use <td> tag.

Syntax:

<table>
  <th> ... </th>
</table>

Example Code

<table>
<tr>
  <th>First Header </th>
  <th>Second Header</th>
</tr>
<tr>
  <td>First Cell</td>
  <td>Second Cell</td>
</tr>
</table>

Out Put:



First Header Second Header
First Cell Second Cell

In the above example <th> tag has been added to "First Header" and "Second Header"





Content