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

# \<anchor\>

## Summary

The `<anchor>` element is used to represent a named anchor point.

An anchor doesn’t necessarily have a representation, as it can be a location or a wrapper around existing markup.

> **Tip:** This element is only used as a target – if you want to point to: - a [document](../../reference/glossary/document.md) – use the [\<xref\> element](element-xref.md). - a [URL](../../reference/glossary/url.md) – use the [\<link\> element](element-link.md). - an anchor in the current document – use `<link href="#[anchor name]" />`.

## Usage context

| Element category | character-style |
| --- | --- |
| PSML level | portable |
| Permitted content | text and other character-style elements |
| Permitted parent |  |
| HTML equivalent | `<a>` |
| OpenXML equivalent | `<w:bookmark>` |

## Attributes

This element includes the following attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| name | [xs:NCName](../datatypes/xml_schema_datatypes.md) | yes | The name of the anchor |

### `@name`

The name of the anchor. It must be unique within the document.

## Examples

### Basic anchor

```lang-xml

<anchor name="part1"/>
```

### Anchor around image

```lang-xml

<anchor name="figure1">
  <image ... />
</anchor>
```

## Schema

### XML Schema

```lang-xml

<xs:element name="anchor">
  <xs:complexType mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="character-style-group"/>
      <xs:element ref="image"/>
    </xs:choice>
    <xs:attribute name="name" type="xs:NCName" use="required"/>
  </xs:complexType>
</xs:element>
```

### Relax Schema

```lang-relax

element anchor {
   attribute name { xs:NCName },
   (character-style-group | image)+
}
```

## Compatibility

This element was introduced in PSML beta 7 and is only supported from PageSeeder 5.6.

