Table header

th

The th element defines a single data cell that plays the role of a column or row header. They may be used anywhere that "td" elements appear.

When a th element is used in the first row of a table, it becomes a column header. When a th element is used in the first cell of a row, it becomes a row header.

Table headers are styled using CSS to make them visually distinctive.

Examples

table {
tr {
th Country
th ISO-3166 alpha-2
th ISO-3166 alpha-3
th UN code
}
tr {
td Argentina
td AR
td ARG
td 032
}
tr {
td Belgium
td BE
td BEL
td 056
}
tr {
td Canada
td CA
td CAN
td 124
}
}
Using th elements as column headers

table {
tr {
th Argentina
td AR
td ARG
td 032
}
tr {
th Belgium
td BE
td BEL
td 056
}
tr {
th Canada
td CA
td CAN
td 124
}
}
Using th elements as rows headers

semantax > row-column > thTable header

Q