References

Collection of references for web development.

HTML th tag

Description

The HTML <th> element represents a header cell.

Attributes

Attribute Value Description
colspan number Specifies the amount of columns the cell extends.
headers id_list Specifies the headers that the element relates to.
rowspan number Specifies the amount of rows the cell extends.
scope col
colgroup
row
rowgroup
auto
Specifies whether the header cell relates to a column, row, or group of column or rows.

Example

<table>
	<tr>
		<th>Name</th>
		<th>Gender</th>
		<th>Age</th>
	</tr>
	<tr>
		<td>David</td>
		<td>Male</td>
		<td>23</td>
	</tr>
</table>