--- title: slug: Web/MathML/Element/msqrt translation_of: Web/MathML/Element/msqrt ---
{{MathMLRef}}

MathML<msqrt>元素用于表示一个平方根(不显示根指数)。它只接受一个参数,语法如下:<msqrt> base </msqrt>

属性

class, id, style
样式表使用。
href
用来设置标签点击后跳转的链接
mathbackground
用来设置标签的背景色,可以使用#rgb#rrggbb或者HTML颜色名
mathcolor
用来设置文字(包括根底数、根指数和根号本身)的颜色,同样可以使用#rgb#rrggbb或者HTML颜色名

例子

下述代码表示: root-x

您的浏览器的渲染结果: x

<math>

  <msqrt>
    <mi>x</mi>
  </msqrt>

</math>

规范

Specification Status Comment
{{ SpecName('MathML3', 'chapter3.html#presm.msqrt', 'msqrt') }} {{ Spec2('MathML3') }} Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.msqrt', 'msqrt') }} {{ Spec2('MathML2') }} Initial specification

浏览器兼容性

{{Compat("mathml.elements.msqrt")}}

相关链接