e01.org

<annotation>

The <annotation> MathML element contains an annotation to the MathML expression in a textual format, for example LaTeX.

The **`<annotation>`** [MathML](/docs/Web/MathML) element contains an annotation to the MathML expression in a textual format, for example [LaTeX](https://www.latex-project.org/).

> [!NOTE]
> Annotations are not supposed to be rendered by browsers and are hidden by default. However, Firefox and Safari render some annotation formats if the first child of the semantics element contains errors or is missing.

## Attributes

This element's attributes include the [global MathML attributes](/docs/Web/MathML/Reference/Global_attributes) as well as the following attributes:

- `encoding`
- : The encoding of the semantic information in the annotation (e.g., `"application/x-tex"`)
- `src`
- : The location of an external source for semantic information.

## Example

```css hidden
html,
body {
height: 100%;
}

body {
display: grid;
place-items: center;
font-size: 1.5rem;
}
```

```html
<math display="block">
<semantics>
<!-- The first child is the MathML expression rendered by default. -->
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>y</mi>
</mrow>

<!-- Annotate with LaTeX, a lightweight markup language. -->
<annotation encoding="application/x-tex">x^{2} + y</annotation>
</semantics>
</math>
```

700

## Technical summary

<table class="properties">
<tr>
<th scope="row">
<a href="/en-US/docs/Web/Accessibility/ARIA/Reference/Roles">Implicit ARIA role</a>
</th>
<td>
None
</td>
</tr>
</table>

## Specifications

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Element/annotation

JSON record · API collection · citation policy