simpletable

The <simpletable> element is used for tables that are regular in structure and do not need a caption. Choose the simple table element when you want to show information in regular rows and columns. For example, multi-column tabular data such as phone directory listings or parts lists are good candidates for simpletable. Another good use of simpletable is for information that seems to beg for a "three-part definition list"—just use the keycol attribute to indicate which column represents the "key" or term-like column of your structure.

This close match of simpletable to tabular, regular data makes simpletable suitable as the basis for specialized structures such as properties (for programming information) and choice tables (for tasks).

Contains

( (sthead) (optional) then (strow) (one or more) )

Contained by

body, section, example, p, note, lq, li, itemgroup, dd, fig, draft-comment, conbody, prereq, context, info, tutorialinfo, stepxmp, choice, stepresult, result, postreq, refbody, refsyn, pd

Inheritance

topic/simpletable

Attributes

Name Description Data Type Default Value Required?
relcolwidth A relative value to specify the width of a column in relationship to the width of the other columns for print output. The values are totaled and made a percent. For example:
relcolwidth="1* 2* 3*"
causes widths of 16.7%, 33.3%, and 66.7%.
relcolwidth="90* 150*"
causes width of 37.5% and 62.5%.
CDATA #IMPLIED No
keycol Defines the column that will be used for row headings. No value indicates no key column. When present, the numerical value causes the specified column to be highlighted as a vertical header. NMTOKEN #IMPLIED No
refcols Designates columns that contain references, and are candidates for automated linking (not currently supported). Columns are identified by a comma-delimited list of numbers (for example: 1,3). NMTOKENS #IMPLIED No
%display-atts; (scale, frame, expanse) A set of related attributes, described at %display-atts; parameter entity PE not applicable Not applicable
%univ-atts; (%select-atts;, %id-atts;, translate, xml:lang) A set of related attributes, described at %univ-atts; parameter entity PE not applicable Not applicable
spectitle The specialized title attribute allows architects of specialized types to define a fixed or default title for a specialized element. Not intended for direct use by authors. CDATA #IMPLIED No
%global-atts; (xtrf, xtrc) A set of related attributes, described at %global-atts; parameter entity PE not applicable Not applicable
class, outputclass Common attributes described in Other common DITA attributes

Example

Source:
<simpletable>
 <sthead>
  <stentry>Type style</stentry>
  <stentry>Elements used</stentry>
 </sthead>
 <strow>
  <stentry>Bold</stentry>
  <stentry>b</stentry>
 </strow>
 <strow>
  <stentry>Italic</stentry>
  <stentry>i</stentry>
 </strow>
 <strow>
  <stentry>Underlined</stentry>
  <stentry>u</stentry>
 </strow>
</simpletable>
Formatted output:
Type style Elements used
Bold b
Italic i
Underlined u