Table heading group

thead

The thead element may optionally be used with a table in order to group together a set of rows that describe the contents of each table column.

The thead element may be the target of a CSS selector, simplifying the styling for all of the data cells it contains.

The thead element should be made up of rows whose cells are defined using "th" elements (rather than "td" elements).

When both colgroup and thead elements are used, the colgroup element must be placed first.

Examples

table {
thead {
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
}
}
The thead element with a single header row

table {
thead {
tr {
th *rowspan=2 Country
th *colspan=3 Country Codes
}
tr {
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
}
}
The thead element with two header rows
0

semantax > row-column > theadTable heading group

🔗 🔎