The Simple Table in DITA

If you want to add a friendly little table to your XML document, then use <simpletable>. Use the <simpletable> element to create exactly that—a simple table. Usually these do not consist of more than two columns.

Here’s an example of a <simpletable> element in action:

simpletable_exercise

 

 

The levels and elements of the <simpletable> are as follows:
<simpletable>
<sthead>
<stentry>
There can only be one <sthead> element in a <simpletable> element.
<stentry> contains the cell’s text and should always be wrapped in the <p> element.
The number of columns in your simple table is determined by how many <stentry> elements are inside the <sthead> element.

As you can see, the <simpletable> is straightforward and “simple.” The complex table <table>, on the other hand, is a bit trickier. I’m still reading up on that one, so please check back for a future post on creating a <table> in DITA.