<th> tag in HTML

The <th> tag is used to specify a header data cell in an HTML table. The <th> header cells must be used as child elements of a parent <tr> element.

Important Description

  • The <th> elements are bold and centered by default.
  • Open and close tag required of <th> element.

Example of <th> tag

<th> Tag Browser Support

Element Chrome Edge Firefox Safari Opera
<th> Yes Yes Yes Yes Yes

Global Attributes

Event Attributes

Attributes

The "align", "axis", "bgcolor", "char", "charoff", "height", "nowrap", "valign", and "width" attributes are not supported in HTML5:

Attribute Value Description
abbr text Abbr attribute specifies an abbreviated version of the content in a header cell
colspan number Colspan attribute specifies the number of columns a cell should span
headers header_id Header attribute specifies one or more header cells a cell is related to
rowspan number Rowspan attribute sets the number of rows a cell should span
scope col
colgroup
row
rowgroup
Scope attribute a header cell is a header for a column, row
sorted reversed
number
reversed number
number reversed
Sorted attribute defines the sort direction of a column

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)