HTML - <th>

The HTML element table header cell <th> defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.

Example

 

See <table> for examples on <th>.

Description  

The HTML element table header cell <th> defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.

Content categories None.
Permitted content
Phrasing content.
Tag omission The start tag is mandatory.
The end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element.
Permitted parent elements A <tr> element.
Normative document HTML5, section 4.9.10 (HTML4.01, section 11.2.6)

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) (Yes) (Yes) (Yes)
align/valign attribute 1.0 No support [1] (Yes) (Yes) (Yes)
char/charoff attribute 1.0 No support [2] (Yes) (Yes) (Yes)
bgcolor attribute No support No support (Yes) No support No support
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)
align/valign attribute ? No support [1] ? ? ?
char/charoff attribute ? No support [2] ? ? ?
bgcolor attribute No support No support (Yes) No support No support

[1] See bug 915.

[2] See bug 2212.

See Also  

 

This element implements the HTMLTableHeaderCellElement interface.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/th

Element HTML HTML tabular data Reference Tables Web