Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

MathML Superscripts

MathML superscript is created with the <msup> tag. You have to place the base inside the <msup> tag, followed by the superscript.

Example

If you want to write x2, use the following MathML code:

Equivalent MathML code:

MathML element <msup> acts more like a function than a normal HTML markup tag. In the above MathML code, the base and the superscript can be thought of as two "arguments" passed to the <msup> "function." Both arguments need to be a single MathML element (e.g., <mi> or <mn>). It is fine for working with atomic values like x and 2, but things get more complicated once we start working with compound expressions.


Grouping Sub-Expressions

Group of sub expression is used to include more than one element. It cannot be passed directly into <msup>. Instead, you will have to use <mrow> tag to group the expression, as shown below.

For example: If you want to write e2x+1, use the following MathML code:

Equivalent MathML code:

It will display the expression like this:

Mathml Superscript 1

To create a complex base expression, you have to wrap the superscript argument in an <mrow> element.

For example: If you want to write an expression (5x ? 3y)2, use the following MathML code:

Equivalent MathMl code:

Supporting Browsers:

Elementchrome browser Chromeie browser IEfirefox browser Firefox (Gecko)opera browser Operasafari browser Safari
<msup>Not SupportedNot SupportedSupportedNot SupportedOnly Basic Support

Next TopicMathML Underscript





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA