<msup>
Baseline 2023Newly available
Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
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:
superscriptshift
Deprecated 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
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
msup | ||||||||||||
superscriptshift |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Non-standard. Check cross-browser support before using.
- Deprecated. Not for use in new websites.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
<msub>
(Subscript)<msubsup>
(Subscript-superscript pair)<mmultiscripts>
(Prescripts and tensor indices)