<merror>

Baseline 2023
Newly available

Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

<merror> MathML元素用于将内容显示为错误消息。该元素的目的是为从其他输入生成 MathML 的程序提供一种标准方法来报告语法错误。

属性

该元素接受全局 MathML 属性

示例

在以下示例中,<merror> 用于指示一些类似 LaTeX 的输入的解析错误:

html
<math display="block">
  <mfrac>
    <merror>
      <mtext>Syntax error: \frac{1}</mtext>
    </merror>
    <mn>3</mn>
  </mfrac>
</math>

规范

Specification
MathML Core
# error-message-merror

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
merror

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support