<msup>
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2023.
The <msup> 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 as well as the following deprecated attribute:
superscriptshiftDeprecated Non-standard-
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.
Examples
html
<math display="block"> <msup> <mi>X</mi> <mn>2</mn> </msup> </math> Technical summary
| Implicit ARIA role | None |
|---|
Specifications
| Specification |
|---|
| MathML Core> # subscripts-and-superscripts-msub-msup-msubsup> |
Browser compatibility
See also
<msub>(Subscript)<msubsup>(Subscript-superscript pair)<mmultiscripts>(Prescripts and tensor indices)