Rows and Row Groups

Use the tr element to create a row in a table. Use the thead, tbody, and tfoot elements to group rows together for stylistic or semantic purposes.

Notes

  • The thead, tbody, and tfoot elements contain one or more tr elements. The tr element contains zero or more td elements.

  • The thead, tbody, and tfoot elements can occur at the end of a table element. The tr element can appear at the end of a table element in place of any thead, tbody, or tfoot elements; or it can appear in a thead, tbody, or tfoot element.

  • The style attribute on the thead, tbody, tfoot, and tr elements takes a space-separated list of style hints. Processing tools should adjust their behavior according to those style hints they understand.

  • The thead, tbody, tfoot, and tr elements can have attributes from external namespaces. See External Namespaces for more information on external-namespace attributes.

Examples

See Examples on the page Tables.

Processing Expectations

Comparison to Other Formats

Schema

The formal definition of the Mallard language is maintained in RELAX NG Compact Syntax in code blocks within this specification. This is the formal definition for the tr, thead, tbody, and tfoot elements. The namespace declarations for these definitions are on the page Pages.

mal_table_tr = element tr {
  mal_table_tr_attr,
  mal_table_td *
}
mal_table_tr_attr = (
  attribute style { xsd:NMTOKENS } ?,
  mal_attr_external *
)
mal_table_thead = element thead {
  mal_table_thead_attr,
  mal_table_tr +
}
mal_table_thead_attr = (
  attribute style { xsd:NMTOKENS } ?,
  mal_attr_external *
)
mal_table_tbody = element tbody {
  mal_table_tbody_attr,
  mal_table_tr +
}
mal_table_tbody_attr = (
  attribute style { xsd:NMTOKENS } ?,
  mal_attr_external *
)
mal_table_tfoot = element tfoot {
  mal_table_tfoot_attr,
  mal_table_tr +
}
mal_table_tfoot_attr = (
  attribute style { xsd:NMTOKENS } ?,
  mal_attr_external *
)