files/en-us/web/mathml/reference/element/annotation/index.md
The <annotation> MathML element contains an annotation to the MathML expression in a textual format, for example LaTeX.
[!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 {{mathmlelement("semantics")}} element contains errors or is missing.
This element's attributes include the global MathML attributes as well as the following attributes:
encoding
"application/x-tex")src {{deprecated_inline}}
html,
body {
height: 100%;
}
body {
display: grid;
place-items: center;
font-size: 1.5rem;
}
<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>
{{ EmbedLiveSample('example', 700, 200, "", "") }}
{{Specifications}}
{{Compat}}