<mglyph>

  • Revision slug: MathML/Element/mglyph
  • Revision title: mglyph
  • Revision id: 36888
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment 7 words added, 3 words removed

Revision Content

Summary

The MathML <mglyph> element is used to display non-standard symbols where existing Unicode characters are not available. It may be used within token elements.

Attributes

alt
This attribute defines the alternative text describing the image. Users will see this displayed if the image URL is wrong, the image is not in one of the supported formats, or until the image is downloaded.
class, id, style
Provided for use with stylesheets.
height
The height of the image.
href
Used to set a hyperlink to a specified URI.
mathbackground
The background color (if the image has transparency). You can use #rgb, #rrggbb and HTML color names.
src
The image URL.
valign
Specifies the vertical alignment with respect to the current baseline.
width
The width of the image.

Examples

<math>
  <mi><mglyph src="my-glyph.png" alt="my glyph"/></mi>
</math>

Browser compatibility

{{ CompatibilityTable() }}

{{ CompatTableDesktop( ['Basic support', CompatNo(), bug("297465"), CompatNo(), CompatNo(), CompatNo()] ) }}

{{ CompatTableMobile( ['Basic support', CompatNo(), CompatNo(), bug("297465"), CompatNo(), CompatNo(), CompatNo()] ) }}

Specification

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

Revision Source

<h2 id="Summary">Summary</h2>
<p>The MathML <code>&lt;mglyph&gt;</code> element is used to display non-standard symbols where existing Unicode characters are not available. It may be used within <a href="/Special:Tags?tag=MathML:Token+Elements" title="https://developer.mozilla.org/Special:Tags?tag=MathML:Token+Elements">token elements</a>.</p>
<h2 id="Attributes">Attributes</h2>
<dl> <dt id="attr-alt">alt</dt> <dd>This attribute defines the alternative text describing the image. Users will see this displayed if the image URL is wrong, the image is not in one of the <a href="../../../En/HTML/Element/Img#Image_Format" rel="internal" title="https://developer.mozilla.org/En/HTML/Element/Img#Image_Format">supported formats</a>, or until the image is downloaded.</dd> <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-height">height</dt> <dd>The height of the image.</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 (if the image has transparency). 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-src">src</dt> <dd>The image URL.</dd> <dt id="attr-valign">valign</dt> <dd>Specifies the vertical alignment with respect to the current baseline.</dd> <dt id="attr-width">width</dt> <dd>The width of the image.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<pre class="brush: html">&lt;math&gt;
  &lt;mi&gt;&lt;mglyph src="my-glyph.png" alt="my glyph"/&gt;&lt;/mi&gt;
&lt;/math&gt;
</pre>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<p>{{ CompatTableDesktop( ['Basic support', CompatNo(), bug("297465"), CompatNo(), CompatNo(), CompatNo()] ) }}</p>
<p>{{ CompatTableMobile( ['Basic support', CompatNo(), CompatNo(), bug("297465"), CompatNo(), CompatNo(), CompatNo()] ) }}</p>
<h2 id="Specification">Specification</h2>
<ul> <li>{{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.mglyph","MathML 3.0 Presentation Markup mglyph", "REC") }}</li>
</ul>
Revert to this revision