此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

<mtext>

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2023年1月⁩.

<mtext> MathML 元素用于呈现没有符号意义的任意文本,例如注释或注解。

若要显示具有符号意义的文本,请改用 <mi><mn><mo><ms>

属性

该元素接受全局 MathML 属性

示例

html
<math display="block">
  <mtext>勾股定理</mtext>
</math>

<math display="block">
  <mtext>/* 在此注释 */</mtext>
</math>

规范

Specification
MathML Core
# text-mtext

浏览器兼容性