<math>
Baseline 2023Newly available
Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Please help us by answering a few questions.
<math>
は最上位の MathML 要素で、一つの数式を記述するのに使われます。これはフローコンテンツが許可されている HTML コンテンツに置くことができます。
メモ: MathML の数式をウェブページに適切に統合するためのヒントについては MathML の記述ページを、その他のデモについては 例ページを参照してください。
属性
この要素の属性には、グローバル MathML 属性の他に以下の属性があります。
display
-
この列挙属性は、囲まれた MathML マークアップをレンダリングする方法を指定します。これは、次のいずれかの値を取ることができます。
block
は、この要素が現在のテキストのスパンの外にある独自のブロックに表示され、math-style
がnormal
に設定されていることを意味します。inline
は、この要素が現在のテキストのスパンの中に表示され、math-style
がcompact
に設定されていることを意味します。
存在しない場合、既定値は
inline
です。
例
この例には 2 つの MathML 式が含まれています。最初のものは、必要なだけのスペースをとって、中央のブロック内に表示されます。 2 番目のものは、高さを最小にするためにサイズと間隔を狭めて、テキストの段落の中に表示されます。
<p>
The infinite sum
<math display="block">
<mrow>
<munderover>
<mo>∑</mo>
<mrow>
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow>
<mo>+</mo>
<mn>∞</mn>
</mrow>
</munderover>
<mfrac>
<mn>1</mn>
<msup>
<mi>n</mi>
<mn>2</mn>
</msup>
</mfrac>
</mrow>
</math>
is equal to the real number
<math display="inline">
<mfrac>
<msup>
<mi>π</mi>
<mn>2</mn>
</msup>
<mn>6</mn>
</mfrac></math
>.
</p>
仕様書
Specification |
---|
MathML Core # the-top-level-math-element |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
math | ||||||||||||
display |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- No support
- No support
- Has more compatibility info.