HTML <th> Tag


The th element specifies a header cell that can appear in an HTML table's initial row. Browsers typically display the content contained within the <th> tag as bold, center-aligned text.

This tag is also generally known as the <th> element. The text in <td> elements are regular and left-aligned by default.

Syntax

Example

Preview

Attributes

Attribute Value Description
abbr text A brief summary of the contents of the cell.
colspan number The number of columns that the cell spans (Default is 1, max value is 1000).
headers header-id List of strings (separated by spaces) that correspond to the id property of the <th> element to which it applies.
rowspan number The number of rows that the cell stretches across (Default is 1, max value is 65534)
scope col 
colgroup 
row 
rowgroup
Strings separated by spaces in a list

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
<th> Yes Yes Yes Yes Yes