About 2261 letters
About 11 minutes
<th>
The <th> HTML element defines a cell as the header of a group of table cells and may be used as a child of the <tr> element. The exact nature of this group is defined by the scope and headers attributes.
abbr
: A short, abbreviated description of the header cell's content provided as an alternative label to use for the header cell when referencing the cell in other contexts. Some user-agents, such as speech readers, may present this description before the content itself.
colspan
: A non-negative integer value indicating how many columns the header cell spans or extends. The default value is 1
. User agents dismiss values higher than 1000 as incorrect, defaulting such values to 1
.
headers
: A list of space-separated strings corresponding to the id
attributes of the <th>
elements that provide the headers for this header cell.
rowspan
: A non-negative integer value indicating how many rows the header cell spans or extends. The default value is 1
; if its value is set to 0
, the header cell will extends to the end of the table grouping section (<thead>
, <tbody>
, <tfoot>
, even if implicitly defined), that the <th>
belongs to. Values higher than 65534
are clipped at 65534
.
scope
: Defines the cells that the header (defined in the <th>
) element relates to. Possible enumerated values are:
row
: the header relates to all cells of the row it belongs to; col
: the header relates to all cells of the column it belongs to; rowgroup
: the header belongs to a rowgroup and relates to all of its cells; colgroup
: the header belongs to a colgroup and relates to all of its cells. If the scope
attribute is not specified, or its value is not row
, col
, rowgroup
, or colgroup
, then browsers automatically select the set of cells to which the header cell applies.
Created in 5/27/2025
Updated in 5/27/2025