---
title: "Element <caption>"
source: https://dev.pageseeder.com/psml/elements/element-caption.html
description: "PSML Element reference for <caption>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~417
---

# \<caption\>

## Summary

The `<caption>` element provides information about a table.

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

## Usage context

| Element category | table |
| --- | --- |
| PSML level | portable |
| Permitted content | text and character-style elements |
| Permitted parent | `<table>` |
| HTML equivalent | `<caption>` |
| OpenXML equivalent | `<w:tblCaption>` |

## Attributes

This element does not have any attributes.

## Examples

### Table with a caption

```lang-xml

<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:

```lang-html

<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**

| Name | Score |
| --- | --- |
| Alice | 17 |
| Bob | 19 |

## Schema

### XML Schema

```lang-xml

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

### Relax Schema

```lang-relax

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 (such as character-style elements), however, the OfficeOpenXML equivalent `<w:tblCaption>` does not.

