{{ APIRef}}
The HTMLTableHeaderCellElement
interface provides special properties and methods (beyond the regular {{domxref("HTMLTableCellElement")}} and {{domxref("HTMLElement")}} interfaces it also has available to it by inheritance) for manipulating the layout and presentation of table header cells in an HTML document.
Properties
Inherits properties from its parent, {{domxref("HTMLTableCellElement")}}, and {{domxref("HTMLElement")}}.
- {{domxref("HTMLTableHeaderCellElement.abbr")}}
- Is a {{domxref("DOMString")}} containing a name used to refer to this cell in other context. It reflects the {{htmlattrxref("abbr", "th")}} attribute.
- {{domxref("HTMLTableHeaderCellElement.scope")}}
-
Is a {{domxref("DOMString")}} representing an enumerated value indicating which cells the header cell applies to. It reflects the {{htmlattrxref("scope", "th")}} attribute and has one of the following values:
"row"
,"col"
,"colgroup"
, or"rowgroup"
. If the attribute is in the auto state, or if an invalid value is set for the attribute,scope
will be returns the empty string,""
. - {{domxref("HTMLTableHeaderCellElement.sorted")}} {{experimental_inline}}
- Is a {{domxref("Boolean")}} value indicating if the table is sorted by the scope associated with this header cell. It reflects the {{htmlattrxref("sorted", "th")}} attribute.
Methods
No specific method; inherits methods from its parent, {{domxref("HTMLTableCellElement")}}, and {{domxref("HTMLElement")}}.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "tabular-data.html#the-table-element", "HTMLTableElement")}} | {{Spec2('HTML WHATWG')}} | Adds the sorted property. |
{{SpecName('HTML5 W3C', "tabular-data.html#the-table-element", "HTMLTableElement")}} | {{Spec2('HTML5 W3C')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
sorted {{experimental_inline}} |
{{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
sorted {{experimental_inline}} |
{{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
See also
- The HTML element implementing this interface: {{HTMLElement("th")}}.