HTML5中的MathML <msup>標記用於在任何表達式上打印功率。
用法:
<msup> child elements </msup>
屬性:此標記接受以下列出的一些屬性:
- class|id|style:此屬性用於保存子元素的樣式。
- mathbackground:此屬性保存數學表達式背景色的值。
- href:此屬性用於保存指向指定URL的任何超鏈接。
- mathcolor:此屬性保存數學表達式的顏色。
- superscriptshift:此屬性定義了將上標移動到表達式基線上方的最小空間。
以下示例說明了HTML5中的MathML <msup>標記:
例:
<!DOCTYPE html>
<html>
<head>
<title>HTML5 MathML msup tag</title>
</head>
<body>
<center>
<h1 style="color:green">
GeeksforGeeks
</h1>
<h3>HTML5 MathML <msup> tag</h3>
<math>
<mfenced open="(" close=")" separators="">
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<msup>
<mi>y</mi>
<mn>2</mn>
</msup>
<mo>=</mo>
<msup>
<mi>z</mi>
<mn>2</mn>
</msup>
</mrow>
</mfenched>
</math>
</center>
</body>
</html>
輸出:
支持的瀏覽器:下麵列出了HTML5 MathML <msup>標記支持的瀏覽器:
- Firefox
相關用法
- HTML5 MathML <mo>標記用法及代碼示例
- HTML5 MathML <mtr>標記用法及代碼示例
- HTML5 MathML <mth>標記用法及代碼示例
- HTML5 MathML <mtd>標記用法及代碼示例
- HTML5 MathML <ms>標記用法及代碼示例
- HTML5 MathML <mi>標記用法及代碼示例
- HTML5 MathML <mn>標記用法及代碼示例
- HTML5 MathML <mglyph>標記用法及代碼示例
- HTML5 MathML <mmultiscripts>標記用法及代碼示例
- HTML5 MathML <merror>標記用法及代碼示例
- HTML5 MathML <mover>標記用法及代碼示例
- HTML5 MathML <msqrt>標記用法及代碼示例
- HTML5 MathML <mfrac>標記用法及代碼示例
- HTML5 MathML <msubsup>標記用法及代碼示例
- HTML5 MathML <math>標記用法及代碼示例
注:本文由純淨天空篩選整理自skyridetim大神的英文原創作品 HTML5 | MathML <msup> Tag。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。