HTML Tutorial
Menu
HTML Forms
Menu
HTML Graphics
Menu
HTML Media
Menu
HTML API
Menu
HTML Headers
Table headers are denoted with <th> elements, each< th >element that represents a table cell.
Example
Table Headers
Use the TH element to define table headers.
Firstname
Lastname
Age
Jill
Smith
50
Eve
Jackson
94
Output:
Table Headers
Use the TH element to define table headers.
Firstname | Lastname | Age |
---|---|---|
Jill | Smith | 50 |
Eve | Jackson | 94 |
Vertical Table Headers
To use the first column as table headers, make the first cell in each row as a th element:
Example:
Vertical Table Headers
The first column becomes table headers if you set the first table cell in each table row to a TH element:
Firstname
Jill
Eve
Lastname
Smith
Jackson
Age
50
94
Output:
Vertical Table Headers
The first column becomes table headers if you set the first table cell in each table row to a TH element:
Firstname | Jill | Eve |
---|---|---|
Lastname | Smith | Jackson |
Age | 50 | 94 |