MathML Superscripts
- It is created with the <msup> tag. Place the base inside the <msup> tag, followed by the superscript.
Example
- Write x2, use the following MathML code:
Equivalent MathML code
Output
Output
- <msup> acts more like a function than a normal HTML markup tag. 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 (Eg., <mi> or <mn>).
Grouping Sub-Expressions
- Group of sub expression is used to include more than one element. It cannot be passed directly into <msup>.
For Example : If you want to write e2x+1, use the following MathML code:
Equivalent MathML Code
Output
Output
- The expression like this:
- Create a complex base expression, We have to wrap the superscript argument in an <mrow> element.
For Eg : If you want to write an expression (5x - 3y)2, use the following MathML Code:
Equivalent MathML Code
Output
Output
Supporting Browsers
Element | |||||
---|---|---|---|---|---|
<msup> | No | No | Yes | No | Only Basic Support |