mozilla

Revision 479393 of <mglyph>

  • Revision slug: Web/MathML/Element/mglyph
  • Revision title: <mglyph>
  • Revision id: 479393
  • Created:
  • Creator: fscholz
  • Is current revision? Yes
  • Comment quick links

Revision Content

{{MathMLRef()}}

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() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatNo() }} {{ CompatNo() }} {{ bug("297465") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }} {{ bug("297465") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}

Specifications

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

 

Revision Source

<p>{{MathMLRef()}}</p>
<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="/en-US/docs/tag/MathML:Token%20Elements">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-US/docs/HTML/Element/Img#Supported_image_formats">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-US/docs/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-US/docs/CSS/color_value#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>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }} {{ bug("297465") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Chrome for Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }} {{ bug("297465") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table" height="49" width="1000">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('MathML3', 'chapter3.html#presm.mglyph', 'mglyph') }}</td>
      <td>{{ Spec2('MathML3') }}</td>
      <td>Current specification</td>
    </tr>
    <tr>
      <td>{{ SpecName('MathML2', 'chapter3.html#presm.mglyph', 'mglyph') }}</td>
      <td>{{ Spec2('MathML2') }}</td>
      <td>Initial specification</td>
    </tr>
  </tbody>
</table>
<p>&nbsp;</p>
Revert to this revision