Back to Content

Index

files/en-us/web/mathml/reference/element/msup/index.md

latest1.3 KB
Original Source

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 {{cssxref("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>

{{EmbedLiveSample('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

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{ MathMLElement("msub") }} (Subscript)
  • {{ MathMLElement("msubsup") }} (Subscript-superscript pair)
  • {{ MathMLElement("mmultiscripts") }} (Prescripts and tensor indices)