Draft

1.2 (2019-02-09)

Table Cells

This is a draft specification. It is likely that changes will still be made before the final specification.

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.

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 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
© 2008-2011, 2018 Shaun McCance
cc-by-sa 3.0 (us)

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

As a special exception, the copyright holders give you permission to copy, modify, and distribute the example code contained in this document under the terms of your choosing, without restriction.

Powered by
Mallard