Table Cells
Use the td element to create cells for each column in a table row. Use the th element to create header cells.
Notes
The td and th elements can contain any general block content.
The td and th elements can occur in a tr element.
The style attribute takes a space-separated list of style hints. Processing tools should adjust their behavior according to those style hints they understand.
The colspan attribute allows a table cell to span across multiple table columns.
The rowspan attribute allows a table cell to span across multiple table rows.
The scope attribute on the th element allows you to specify what portion of the table the header applies to: row, col, rowspan, or colspan.
The td and th elements can have attributes from external namespaces. See External Namespaces for more information on external-namespace attributes.
Processing Expectations
See Processing Expectations on the page Tables.
Comparison to Other Formats
See Comparison to Other Formats on the page Tables.
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 td element. The namespace declarations for this definition are on the page Pages.
mal_table_td = element td {
mal_table_td_attr,
mal_table_td_content *
}
mal_table_td_attr = (
attribute style { xsd:NMTOKENS } ?,
attribute rowspan { text } ?,
attribute colspan { text } ?,
mal_attr_external *
)
mal_table_td_content = mal_block
mal_table_th = element th {
mal_table_th_attr,
mal_table_th_content *
}
mal_table_th_attr = (
attribute style { xsd:NMTOKENS } ?,
attribute rowspan { text } ?,
attribute colspan { text } ?,
attribute scope { "row" | "col" | "rowgroup" | "colgroup" } ?,
mal_attr_external *
)
mal_table_th_content = mal_block