Html Th Tag

In the html <th> tag is used to header box in the html table. Which tag must be above head of <tr> tag and which tag is displaying content to bold and center. 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 and in this <td> tag is display text to center and left align.

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