GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

<msup>

The <msup> MathML element is used to attach a superscript to an expression.

The **`<msup>`** [MathML](/docs/Web/MathML) element is used to attach a superscript to an expression.

It uses the following syntax: `<msup> base superscript </msup>`.

## Attributes

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

- `superscriptshift`
- : A length-percentage indicating the minimum amount to shift the baseline of the superscript up.

> [!NOTE]
> For the `superscriptshift` attribute, some browsers may also accept [legacy MathML lengths](/docs/Web/MathML/Reference/Values#legacy_mathml_lengths).

## Examples

```html
<math display="block">
<msup>
<mi>X</mi>
<mn>2</mn>
</msup>
</math>
```

Examples

## 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

## See also

- msub (Subscript)
- msubsup (Subscript-superscript pair)
- mmultiscripts (Prescripts and tensor indices)

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/msup

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·