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

# \<toc\>

## Summary

The `<toc>` element is used as a placeholder for the [table of content](../../reference/glossary/table_of_contents.md).

It is used to indicate to a PSML processor where to generate the table of content for the [document](../../reference/glossary/document.md).

## Usage context

| Element category | structure |
| --- | --- |
| PSML level | portable |
| Permitted content | *none \** |
| Permitted parent | `<document>` |
| HTML equivalent | no equivalent |
| OpenXML equivalent |  |

> **Note:** \* In [PSML processed](../universal_format/Universal_Processed_Format.md) format, the content can be `<toc-tree>.`

## Attributes

No attributes.

## Examples

In portable PSML, the `<toc>` element is always empty.

```lang-xml
<toc/>
```

When PSML is processed, the table of contents is injected and the `<toc>` element content contains a `<toc-tree>` element.

```lang-xml
<toc>
  <toc-tree title="Specification">
    <toc-part level="1" title="Introduction" idref="123-1-1-1">
      <toc-part level="2"
                title="Overview"
                idref="123-1-2-1"
                prefix="1."
                canonical="0.1." />
    </toc-part>
  </toc-tree>
</toc>
```

## Schema

### XML Schema

```lang-xml
<xs:element name="toc">
  <xs:complexType/>
</xs:element>
```

### Relax Schema

```lang-relax

element toc {}
```

## Compatibility

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

