How are titles and captions added to DITA tables?

Titles and captions can be added to tables to provide context and labeling. These provide readers with information about the table’s content, purpose, or context.

The title is typically placed above the table and provides a brief description or title for the entire table. This title helps readers understand the content of the table before diving into the details. The caption appears below the table and is used to provide additional information or context for the table. Captions can be longer than titles and often offer more detailed explanations. Titles and captions in DITA tables are usually placed within <title> and <caption> elements, respectively. These elements are commonly placed within the <table> element but can also be part of individual table column or row groups.


          <title>Product Comparison</title>
          <caption>A comparison of features in different product versions.</caption>
          <tgroup cols="3">
            <colspec colname="col1" colwidth="1*"/>
            <colspec colname="col2" colwidth="1*"/>
            <colspec colname="col3" colwidth="1*"/>
                <entry>Version 1</entry>
                <entry>Version 2</entry>
                <entry>Feature 1</entry>
                <entry>Feature 2</entry>

In this example, the <title> element provides a brief title for the table, indicating it’s a “Product Comparison.” The <caption> element gives additional context by explaining what the comparison is about. These elements help readers understand the purpose of the table and the information it presents.