ⓘ th – table header cell # T
The
th
element represents
a header cell in a table.
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.
- Identifies one or more
th
elements that apply to its
th.
- th =
#
- (detailed attribute description to come)
Additional constraints and admonitions #
-
The “scope” attribute on the “td” element is obsolete.
Use the “scope” attribute on a “th” element instead.
-
The “abbr” attribute on the “th” element is obsolete.
Consider instead beginning the cell contents with concise text, followed by further elaboration if needed.
-
The “axis” attribute on the “th” element is obsolete.
Use the “scope” attribute instead.
-
The “align” attribute on the “th” element is obsolete.
Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
-
The “width” attribute on the “th” element is obsolete.
Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
-
The “char” attribute on the “th” element is obsolete.
Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
-
The “charoff” attribute on the “th” element is obsolete.
Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
-
The “valign” attribute on the “th” element is obsolete.
Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
-
The “bgcolor” attribute on the “th” element is obsolete.
Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
-
The “height” attribute on the “th” element is obsolete.
Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
-
The “nowrap” attribute on the “th” element is obsolete.
Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
Permitted parent elements #
tr
Typical default display properties #
th {
display: table-cell;
vertical-align: inherit; }
th {
font-weight: bold;
text-align: center; }