17.4.65 tc

This element specifies a single cell in a table row, which contains the table’s content. Table cells in WordprocessingML are analogous to HTML td elements.

A tc element has one formatting child element, tcPr (17.4.69), which defines the properties for the cell. Each unique property on the table cell is specified by a child element of this element. As well, a table cell can contain any block-level content, which allows for the nesting of paragraphs and tables within table cells.

If a table cell does not include at least one block-level element, then this document shall be considered corrupt.

[Example: Consider a table consisting of a single table cell, which contains the text Hello,

Hello, world

This table cell’s content is represented by the following WordprocessingML:

<w:tc>
  <w:tcPr>
    <w:tcW w:w="0" w:type="auto"/>
  </w:tcPr>
  <w:p>
    <w:r>
      <w:t>Hello, world</w:t>
    </w:r>
  </w:p>
</w:tc>

The tc element contains a set of cell-level properties defined using the tcPr element, and a single block-level element - in this case, a paragraph. end example]

Attributes

id (Table Cell Identifier)

Specifies a unique identifier for the current table cell. This identifier shall be unique within the table, and is used to identify this table cell as a header cell for other cells within the table, using the headers child element.

If this attribute is omitted, this table cell has no unique identifier.

[Example: Consider a table cell defined as follows:

  <w:tc
          w:id="januaryeight">
  </w:tc>

The value in the id specifies a unique identifer of januaryeight. Other cells in the table are then able to reference this cell as a row or column header by referencing this ID. end example]

The possible values for this attribute are defined by the ST_String simple type (22.9.2.13).

[Note: The W3C XML Schema definition of this element’s content model (CT_Tc) is located in A.1. end note]

Last updated on