jump

HTML 5: The Markup Language (ARIA Edition)

thtable header cell # T

The th element represents a header cell in a table.

Permitted contents #

Permitted attributes #

global attributes
Any attributes permitted globally.
scope = d:string "row" or d:string "col" or d:string "rowgroup" or d:string "colgroup" #
Specifies what set of cells the th element applies to.
colspan = positive integer #
Specifies the number of adjacent columns “spanned” by its th element.
rowspan = non-negative integer #
Specifies the number of following rows “spanned” by its th element.
headers = list of ID references #
Identifies one or more th elements that apply to its th.
th = #
(detailed attribute description to come)

Additional constraints and admonitions #

Tag omission #

A th element must have a start tag.

A th element’s end tag may be omitted if the th element is immediately followed by a td or th element, or if there is no more content in the parent element.

Permitted parent elements #

tr

DOM interface #

interface HTMLTableHeaderCellElement : HTMLTableCellElement {
           attribute DOMString scope;
};

Typical default display properties #

th {
display: table-cell;
vertical-align: inherit; }
th {
font-weight: bold;
text-align: center; }