---
title: "Element <labels>"
source: https://dev.pageseeder.com/api/elements/element_labels.html
description: "API Element reference for <labels>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~210
---

# \<labels\>

## Summary

A comma-separated list of labels.

The `<labels>` element lists the labels attached to a comment as comma-separated values.

Labels are configured using the [label configuration](../../reference/folders_and_files/project_template/Label.md).

## Usage context

| Permitted content | `text` |
| --- | --- |
| Permitted parent | `<comment>`, `<event>` |

## Attributes

No attributes.

## Examples

```lang-xml

<labels>important,security</labels>
```

## Schema

### XML Schema

```lang-relax

<xs:element name="labels" type="label-list"/>

<xs:simpleType name="label-list">
  <xs:restriction base="xs:string">
    <xs:pattern value="[a-zA-Z0-9_\-,]*"/>
  </xs:restriction>
</xs:simpleType>
```

### Relax Schema

```lang-relax

element labels { text }
```

## Compatibility

No change since initial API release.

