MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 39384 of <merror>

  • Revision slug: MathML/Element/merror
  • Revision title: merror
  • Revision id: 39384
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment 2 words added, 2 words removed

Revision Content

Summary

The MathML <merror> element is used to display contents as error messages. In Firefox this error message is rendered similar to the typical XML error message. Note that this error is not thrown when your MathML markup is wrong or not well-formed XML. You will still get an XML parsing error (in case of the XHTML notation of MathML), which has nothing to do with <merror>.

Attributes

class, id, style
Provided for use with stylesheets.
href
Used to set a hyperlink to a specified URI.
mathbackground
The background color. You can use #rgb, #rrggbb and HTML color names.
mathcolor
The text color and also the fraction line color. You can use #rgb, #rrggbb and HTML color names.

Examples

<math>

<merror>
  <mrow>
    <mtext> Division by zero: </mtext>
    <mfrac>
      <mn> 1 </mn>
      <mn> 0 </mn>
    </mfrac>
  </mrow>
</merror>

</math>

Browser compatibility

{{ CompatibilityTable() }}

{{ CompatTableDesktop( ['Basic support', CompatNo(), CompatGeckoDesktop("1.0"), CompatNo(), "9.5", "5.1"], ['href', CompatNo(), CompatGeckoDesktop("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}

{{ CompatTableMobile( ['Basic support', CompatNo(), CompatNo(), CompatGeckoMobile("1.0"), CompatNo(), CompatNo(), CompatNo()], ['href', CompatNo(), CompatNo(), CompatGeckoMobile("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}

Specification

  • {{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.merror","MathML 3.0 Presentation Markup merror", "REC") }}

Revision Source

<h2>Summary</h2>
<p>The MathML <code>&lt;merror&gt;</code> element is used to display contents as error messages. In Firefox this error message is rendered similar to the typical XML error message. Note that this error is<strong> not</strong> thrown when your MathML markup is wrong or not well-formed XML. You will still get an XML parsing error (in case of the XHTML notation of MathML), which has nothing to do with <code>&lt;merror&gt;</code>.</p>
<h2>Attributes</h2>
<dl> <dt id="attr-class-id-style">class, id, style</dt> <dd>Provided for use with <a href="/en/CSS" title="en/CSS/">stylesheets</a>.</dd> <dt id="attr-href">href</dt> <dd>Used to set a hyperlink to a specified URI.</dd> <dt id="attr-mathbackground">mathbackground</dt> <dd>The background color. You can use <code>#rgb</code>, <code>#rrggbb</code> and <a href="/en/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="en/CSS/color value#HTML.2fSVG.2fX11.c2.a0 Color Keywords">HTML color names</a>.</dd> <dt id="attr-mathcolor">mathcolor</dt> <dd>The text color and also the fraction line color. You can use <code>#rgb</code>, <code>#rrggbb</code> and <a href="/en/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="en/CSS/color value#HTML.2fSVG.2fX11.c2.a0 Color Keywords">HTML color names</a>.</dd>
</dl>
<h2>Examples</h2>
<pre class="brush: html">&lt;math&gt;

&lt;merror&gt;
  &lt;mrow&gt;
    &lt;mtext&gt; Division by zero: &lt;/mtext&gt;
    &lt;mfrac&gt;
      &lt;mn&gt; 1 &lt;/mn&gt;
      &lt;mn&gt; 0 &lt;/mn&gt;
    &lt;/mfrac&gt;
  &lt;/mrow&gt;
&lt;/merror&gt;

&lt;/math&gt;
</pre>
<h2>Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<p>{{ CompatTableDesktop( ['Basic support', CompatNo(), CompatGeckoDesktop("1.0"), CompatNo(), "9.5", "5.1"], ['href', CompatNo(), CompatGeckoDesktop("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}</p>
<p>{{ CompatTableMobile( ['Basic support', CompatNo(), CompatNo(), CompatGeckoMobile("1.0"), CompatNo(), CompatNo(), CompatNo()], ['href', CompatNo(), CompatNo(), CompatGeckoMobile("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}</p>
<h2>Specification</h2>
<ul> <li>{{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.merror","MathML 3.0 Presentation Markup merror", "REC") }}</li>
</ul>
Revert to this revision