--- title: <msqrt> slug: Web/MathML/Element/msqrt tags: - MathML - 平方根 translation_of: Web/MathML/Element/msqrt --- <p>{{MathMLRef()}}</p> <p>MathMLの <code><msqrt></code> 要素は平方根(根指数のついていない累乗根)を表示するために用いられます。 引数は一つだけで、構文は <code><msqrt> <em>base</em> </msqrt></code> となります。</p> <h2 id="属性">属性</h2> <dl> <dt id="attr-class-id-style">class, id, style</dt> <dd><a href="/ja/docs/CSS">CSS</a>を用いて修飾を行なう際に使われます。</dd> <dt id="attr-href">href</dt> <dd>ハイパーリンクを設定する際に用いられます。</dd> <dt id="attr-mathbackground">mathbackground</dt> <dd>数式の背景色を指定するために使われます。<code>#rgb</code><font face="Arial, x-locale-body, sans-serif">、</font><code>#rrggbb</code>のような16進表現のほか、HTMLで定められた<a href="/ja/docs/Web/CSS/color_value#Color_keywords" rel="noopener">色キーワード</a>を用いることができます。</dd> <dt id="attr-mathcolor">mathcolor</dt> <dd>根号を含んだ数式の文字の色を指定するために使われます。<code>#rgb</code><font face="Arial, x-locale-body, sans-serif">、</font><code>#rrggbb</code>のような16進表現のほか、HTMLで定められた<a href="/ja/docs/Web/CSS/color_value#Color_keywords" rel="noopener">色キーワード</a>を用いることができます。</dd> </dl> <h2 id="例">例</h2> <p>レンダリングのサンプル(画像): <img alt="root-x" src="/files/3201/msqrt.png" style="margin-left: 10px; vertical-align: middle;"></p> <p>ブラウザのレンダリング結果: <math> <msqrt> <mi>x</mi> </msqrt> </math></p> <pre class="brush: html"><math> <msqrt> <mi>x</mi> </msqrt> </math> </pre> <h2 id="ブラウザごとの互換性">ブラウザごとの互換性</h2> <p>{{Compat("mathml.elements.msqrt")}}</p> <h2 id="Specifications" name="Specifications">仕様</h2> <table class="standard-table"> <thead> <tr> <th scope="col">Specification</th> <th scope="col">Status</th> <th scope="col">Comment</th> </tr> </thead> <tbody> <tr> <td>{{ SpecName('MathML3', 'chapter3.html#presm.msqrt', 'msqrt') }}</td> <td>{{ Spec2('MathML3') }}</td> <td>Current specification</td> </tr> <tr> <td>{{ SpecName('MathML2', 'chapter3.html#presm.msqrt', 'msqrt') }}</td> <td>{{ Spec2('MathML2') }}</td> <td>Initial specification</td> </tr> </tbody> </table> <h2 id="See_also">See also</h2> <ul> <li>{{ MathMLElement("mroot") }} (Radical with an index)</li> </ul>