The <th>
element
Short for ‘Table Heading’. A single cell of a table containing a heading which indicates what kind of information is contained in the other cells in the same row or column.
Full list of attributes
All the usual HTML global attributes are available
abbr
- Optional abbreviated version of header's contents, for use by screen-readers or other assistive technologies when indicating the contents of a data cell.
colspan
- The number of columns across which a table heading cell should be spread. Defaults to 1.
headers
- A list of IDs of other
<th>
elements that this element is a subheading of. rowspan
- The number of rows down which a table heading cell should be spread. Defaults to 1.
scope
- Indicates what cells the header is intended to label. Valid values are
row
,col
,rowgroup
, andcolgroup
. sorted
- Enables automatic table sorting for this column, and can control which columns have highest priority for sorting, and whether their natural sort order should be reversed.