th ElementThe th element is declared by the XHTML 1.1 Tables Module
Elements in the Tables Module are:table | caption | col | colgroup | thead | tfoot | tbody | tr | th | td
The th element is used to specify a pure header cell within a
table. A table can contain both pure header cells and also data cells
(which are specified by the td element).
Cells created using th are, by default, usually displayed by user
agents differently than those created by td - possibly using a bold typeface
and/or centred text.
Any cell which functions
as both a header cell and a data cell - and thus is not a
pure header cell - should be specified by td (rather than th)
and either a scope attribute or headers attributes should be
used to indicate the cells for which it is a header. Of course,
it is also possible - and common - to use either the scope or
the headers method to indicate the cells for which a th
element is a header.
Any table cell's contents may be assigned an abbreviation
(using the abbr attribute) or longer, explanatory text
(using the common title attribute).
A single cell can be made to span more than one table row
and/or column by adding a rowspan and/or colspan attribute
to the cell. See the tr element for more information.
Although it is usually preferable to use
CSS for purely
presentational matters, it is possible to control the alignment
of text within a cell using its align and/or valign
attributes.
There are no #REQUIRED attributes on the th element.
th element are listed below:abbr [ type Text ]align [ type Enumeration (left | center | right | justify | char) ]axis [ type CDATA ]char [ type Character ]align attribute is set to "char", this specifies a single character at which to align the contents of the cellcharoff [ type Length ]char (again, I don't know of any user agents which support this attribute)colspan [ type Number - default="1" ]headers [ type IDREFS ]id values which apply to the current cellrowspan [ type Number - default="1" ]scope [ type Enumeration (row | col | rowgroup | colgroup) ]valign [ type Enumeration (top | middle | bottom | baseline) ]th element are listed below:class [ type NMTOKENS ]id [ type ID ]style [ type CDATA ], from the Style Attribute Module (deprecated)title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]All attributes in the
Events Attribute Collection
are supported:onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
th element is:
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
thabbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1 - h6, kbd, p, pre, q, samp, span, strong, varadl, ol, ultablebutton, fieldset, form, input, label, select, textareaimgb, big, hr, i, small, sub, sup, ttmapnoscript, scriptdel, insbdoobjectrubythtr