<msup>

  • Revision slug: MathML/Element/msup
  • Revision title: msup
  • Revision id: 34373
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment href is implemented in Gecko 7.0 (bug 534968); 2 words added, 2 words removed

Revision Content

Summary

The MathML <msup> element is used to attach a superscript to an expression. It uses the following syntax: <msup> base superscript </msup>.

Attributes

class, id, style
Provided for use with stylesheets.
href {{ gecko_minversion_inline("7.0") }}
Used to set a hyperlink to a specified URI.
mathbackground {{ gecko_minversion_inline("2.0") }}
The background color. You can use #rgb, #rrggbb and HTML color names.
mathcolor {{ gecko_minversion_inline("2.0") }}
The text color. You can use #rgb, #rrggbb and HTML color names.
superscriptshift
The minimum space by which to shift the superscript up from the baseline of the expression, as a length value.

Examples

Rendering: x1

<math>

  <msup>
    <mi>X</mi>
    <mn>2</mn>
  </msup> 

</math>

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatNo() }} {{ CompatGeckoDesktop("1.0") }} {{ CompatNo() }} 9.5 5.1
superscriptshift attribute {{ CompatNo() }} {{ CompatGeckoDesktop("1.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatGeckoMobile("1.9.2") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
superscriptshift attribute {{ CompatNo() }} {{ CompatGeckoMobile("1.9.2") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}

Specification

  • {{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.msup","MathML 3.0 Presentation Markup msup", "REC") }}

See also

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

Revision Source

<h2>Summary</h2>
<p>The MathML <code>&lt;msup&gt;</code> element is used to attach a superscript to an expression. It uses the following syntax: <code>&lt;msup&gt; <em>base superscript</em> &lt;/msup&gt;</code>.</p>
<h2>Attributes</h2>
<dl> <dt id="attr-class-id-style">class, id, style</dt> <dd>Provided for use with <a href="/en/CSS" title="en/CSS/">stylesheets</a>.</dd> <dt id="attr-href">href {{ gecko_minversion_inline("7.0") }}</dt> <dd>Used to set a hyperlink to a specified URI.</dd> <dt id="attr-mathbackground">mathbackground {{ gecko_minversion_inline("2.0") }}</dt> <dd>The background color. You can use <code>#rgb</code>, <code>#rrggbb</code> and <a href="/en/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="en/CSS/color value#HTML.2fSVG.2fX11.c2.a0 Color Keywords">HTML color names</a>.</dd> <dt id="attr-mathcolor">mathcolor {{ gecko_minversion_inline("2.0") }}</dt> <dd>The text color. You can use <code>#rgb</code>, <code>#rrggbb</code> and <a href="/en/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="en/CSS/color value#HTML.2fSVG.2fX11.c2.a0 Color Keywords">HTML color names</a>.</dd> <dt id="attr-superscriptshift">superscriptshift</dt> <dd>The minimum space by which to shift the superscript up from the baseline of the expression, as a <a href="/en/MathML/Attributes/Value#Lengths" title="en/MathML/Attributes/Value#Lengths">length value.</a></dd>
</dl>
<h2>Examples</h2>
<p>Rendering: <img alt="x1" src="/@api/deki/files/4856/=msup.png" style="vertical-align: middle; margin-left: 10px;"></p>
<pre class="brush: html">&lt;math&gt;

  &lt;msup&gt;
    &lt;mi&gt;X&lt;/mi&gt;
    &lt;mn&gt;2&lt;/mn&gt;
  &lt;/msup&gt; 

&lt;/math&gt;
</pre>
<h2>Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>{{ CompatNo() }}</td> <td>9.5</td> <td>5.1</td> </tr> <tr> <td><code>superscriptshift</code> attribute</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> </tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>superscriptshift</code> attribute</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> </tbody>
</table>
</div>
<h2>Specification</h2>
<ul> <li>{{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.msup","MathML 3.0 Presentation Markup msup", "REC") }}</li>
</ul>
<h2>See also</h2>
<ul> <li>{{ MathMLElement("msub") }} (Subscript)</li> <li>{{ MathMLElement("msubsup") }} (Subscript-superscript pair)</li> <li>{{ MathMLElement("mmultiscripts") }} (Prescripts and tensor indices)</li>
</ul>
Revert to this revision