Table entry
A simple table entry represents a single cell within a simple table.
Syntax
The syntax for representing this component varies depending on the authoring format:
Authoring format | Syntax and example |
---|---|
XDITA |
|
HDITA |
|
MDITA |
Table entries inside a row are separated by pipes
(
|
Attributes
The available attributes vary based on the authoring format:
- XDITA and HDITA
- The following attributes are available on this element: ID
attributes, localization attributes,
table accessibility attributes,
@props
, and the attributes listed below. - MDITA
- There is no attribute support for the MDITA core profile. For the MDITA extended profile, attributes can be specified by using the HDITA representation.
For XDITA and HDITA, the following additional attributes are also available:
Examples
This section is non-normative.
This section contains examples of how the table entry component can be used in the three authoring formats. The examples focus on tables that include spanned rows.
The following code sample shows how the table entry component can be used to span rows in a table:
<simpletable id="dog-breed-categories">
<title>Categories of dog breeds</title>
<sthead>
<stentry><p>Category</p></stentry>
<stentry><p>Breed</p></stentry>
<stentry><p>Size</p></stentry>
<stentry><p>Life expectancy</p></stentry>
</sthead>
<strow>
<stentry rowspan="3"><p>Hound group</p></stentry>
<stentry><p>American Foxhound</p></stentry>
<stentry><p>Large</p></stentry>
<stentry><p>11-13 years</p></stentry>
</strow>
<strow>
<stentry><p>Basset Hound</p></stentry>
<stentry><p>Medium</p></stentry>
<stentry><p>12-13 years</p></stentry>
</strow>
<strow>
<stentry><p>Rhodesian Ridgeback</p></stentry>
<stentry><p>Large</p></stentry>
<stentry><p>10-12 years</p></stentry>
</strow>
<!-- ... -->
</simpletable>
Note that the table has a title, as well as an
@id
attribute which makes it possible to reuse
this table in other contexts.
The following code sample shows how the table entry component can be used to span rows in a table:
<table id="dog-breed-categories">
<caption>Categories of dog breeds</caption>
<tr>
<th><p>Category</p></th>
<th><p>Breed</p></th>
<th><p>Size</p></th>
<th><p>Life expectancy</p></th>
</tr>
<tr>
<td rowspan="3"><p>Hound group</p></td>
<td><p>American Foxhound</p></td>
<td><p>Large</p></td>
<td><p>11-13 years</p></td>
</tr>
<tr>
<td><p>Basset Hound</p></td>
<td><p>Medium</p></td>
<td><p>12-13 years</p></td>
</tr>
<tr>
<td><p>Rhodesian Ridgeback</p></td>
<td><p>Large</p></td>
<td><p>10-12 years</p></td>
</tr>
<!-- ... -->
</table>
Note that the table has a title, as well as an
@id
attribute which makes it possible to reuse
this table in other contexts.
MDITA does not support tables with spans.