PSML

A complete reference of PageSeeder's markup language PSML

<caption>

Summary

The <caption> element provides information about a table.

If a table includes a caption, it should be the first child element of table.

Usage context

Element categorytable
PSML levelportable
Permitted contenttext and character-style elements
Permitted parent<table>
HTML equivalent<caption> 
OpenXML equivalent<w:tblCaption>
PSStandard equivalent<caption>

Attributes

No attributes.

Examples

Table with a caption

<table>
  <caption>Average scores</caption>
  <row part="header">
    <cell>Name</cell>
    <cell>Score</cell>
  </row>
  <row>
    <cell>Alice</cell>
    <cell>17</cell>
  </row>
  <row>
    <cell>Bob</cell>
    <cell>19</cell>
  </row>
</table>

This would be generally be represented in HTML as:

<table>
   <caption>Average scores</caption>
   <thead>
     <tr>
       <th>Name</th>
       <th>Score</th>
     </tr>
   </thead>
   <tbody>
     <tr>
       <td>Alice</td>
       <td>17</td>
     </tr>
     <tr>
       <td>Bob</td>
       <td>19</td>
     </tr>
   </tbody>
 </table>

And would render as:

Average scores
NameScore
Alice17
Bob19

Schema

XML Schema

<xs:element name="caption" type="character-style"/>

Relax Schema

element caption { character-style }

Compatibility

This element was introduced in the first draft of PSML and is well supported from PageSeeder 5.1.

Warning!

The PSML caption supports rich text (i.e. character-style elements), however the OfficeOpenXML equivalent <w:tblCaption> does not.

See also

Created on , last edited on