Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/mathml/element/msup/index.md
6520 views
---
title: <msup> slug: Web/MathML/Element/msup browser-compat: mathml.elements.msup
---

{{MathMLRef}}

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_inline}} {{Non-standard_Inline}}

    • : 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

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

{{ EmbedLiveSample('msup_example', 700, 200, "", "") }}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{ MathMLElement("msub") }} (Subscript)

  • {{ MathMLElement("msubsup") }} (Subscript-superscript pair)

  • {{ MathMLElement("mmultiscripts") }} (Prescripts and tensor indices)