A simple HTML table with two header cells and two data cells:
![]()
The <th> tag is supported in all major browsers.
The <th> tag defines a header cell in an HTML table.
An HTML table has two
kinds of cells:
The text in <th> elements are bold and centered by default.
The text in <td> elements are regular and left-aligned by default.
Some HTML 4.01 attributes are not supported in HTML5.
| Attribute | Value | Description |
|---|---|---|
| abbr | text | Not supported in HTML5 |
| align | left right center justify char |
Not supported in HTML5 |
| axis | category_name | Not supported in HTML5 |
| char | character | Not supported in HTML5 |
| charoff | number | Not supported in HTML5 |
| colspan | number | Specifies the number of columns a header cell should span |
| headers | header_id | Specifies one or more header cells a cell is related to |
| height | pixels % |
Not supported in HTML5 |
| nowrap | nowrap | Not supported in HTML5 |
| rowspan | number | Specifies the number of rows a header cell should span |
| scope | col colgroup row rowgroup |
Specifies whether a header cell is a header for a column, row, or group of columns or rows |
| valign | top middle bottom baseline |
Not supported in HTML5 |
| width | pixels % |
Not supported in HTML5 |
The <th> tag also supports the Global Attributes in HTML5.
The <th> tag also supports the Event Attributes in HTML5.
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $3.98 Unlimited Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| XML Editor - Free Trial! |
| FREE Website BUILDER |
| Best Website Templates Top CSS Templates |
| CREATE HTML Websites |
| EASY WEBSITE BUILDER |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|