mozilla

Revision 34413 of <mspace>

  • Revision slug: MathML/Element/mspace
  • Revision title: mspace
  • Revision id: 34413
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment remove labels; 51 words added, 43 words removed

Revision Content

Summary

The MathML <mspace> element is used to display a blank space, whose size is set by its attributes.

Attributes

class, id, style
Provided for use with stylesheets.
depth
The desired depth (below the baseline) of the space (see length for values and units).
height
The desired height (above the baseline) of the space (see length for values and units).
linebreak
Indicates a line-break at the space. Possible values: auto (default value), newline, nobreak, goodbreak, badbreak.
Starting with MathML 3, it is preferred to use {{ MathMLElement("mo") }} to control linebreaking.
mathbackground
The background color. You can use #rgb, #rrggbb and HTML color names.
width
The desired width of the space (see length for values and units).

Examples

<math>

  <mspace depth="40px" height="20px" />

  <mspace width="100px" />

</math>

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatNo() }} {{ CompatGeckoDesktop("1.0") }} {{ CompatNo() }} 9.5 {{ CompatNo() }}
linebreak attribute {{ CompatNo() }} {{ CompatNo() }} {{ bug("380266") }} {{ CompatNo() }} 9.5 (badbreak is not supported) {{ CompatNo() }}
depth, height, width {{ CompatNo() }} {{ CompatGeckoDesktop("1.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatGeckoMobile("1.9.2") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
linebreak attribute {{ CompatNo() }} {{ CompatNo() }} {{ bug("380266") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
depth, height, width {{ CompatNo() }} {{ CompatGeckoMobile("1.9.2") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Note: Indentation attributes are not implemented yet (for Gecko see {{ bug("534962") }}).
Also note that some common attributes like mathcolor, mathvariant or dir have no effect on <mspace>.

Specification

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

See also

  • {{ MathMLElement("mpadded") }}
  • {{ MathMLElement("mphantom") }}

Revision Source

<h2 id="Summary">Summary</h2>
<p>The MathML <code>&lt;mspace&gt;</code> element is used to display a blank space, whose size is set by its attributes.</p>
<h2 id="Attributes">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-depth">depth</dt> <dd>The desired depth (below the baseline) of the space (see <a href="/en/MathML/Attributes/Values#Lengths" title="en/MathML/Attributes/Values#Lengths">length</a> for values and units).</dd> <dt id="attr-height">height</dt> <dd>The desired height (above the baseline) of the space (see <a href="/en/MathML/Attributes/Values#Lengths" title="en/MathML/Attributes/Values#Lengths">length</a> for values and units).</dd> <dt id="attr-linebreak">linebreak</dt> <dd>Indicates a line-break at the space. Possible values: <code>auto</code> (default value), <code>newline</code>, <code>nobreak</code>, <code>goodbreak</code>, <code>badbreak</code>.<br> Starting with MathML 3, it is preferred to use {{ MathMLElement("mo") }} to control linebreaking.</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-width">width</dt> <dd>The desired width of the space (see <a href="/en/MathML/Attributes/Values#Lengths" title="en/MathML/Attributes/Values#Lengths">length</a> for values and units).</dd>
</dl>
<h2 id="Examples">Examples</h2>
<pre class="brush: html">&lt;math&gt;

  &lt;mspace depth="40px" height="20px" /&gt;

  &lt;mspace width="100px" /&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>{{ CompatGeckoDesktop("1.0") }}</td> <td>{{ CompatNo() }}</td> <td>9.5</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>linebreak</code> attribute</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }} {{ bug("380266") }}</td> <td>{{ CompatNo() }}</td> <td>9.5 (<code>badbreak</code> is not supported)</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>depth</code>, <code>height</code>, <code>width</code></td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoDesktop("1.0") }}</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>Firefox Mobile (Gecko)</th> <th>IE Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>linebreak</code> attribute</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }} {{ bug("380266") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>depth</code>, <code>height</code>, <code>width</code></td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> </tbody> </table>
</div>
<div class="note"><strong>Note:</strong> <a class="external" href="http://www.w3.org/TR/MathML3/chapter3.html#presm.lbindent.attrs" title="http://www.w3.org/TR/MathML3/chapter3.html#presm.lbindent.attrs">Indentation attributes</a> are not implemented yet (for Gecko see {{ bug("534962") }}).<br> Also note that some common attributes like <code>mathcolor</code>, <code>mathvariant</code> or <code>dir</code> have no effect on <code>&lt;mspace&gt;</code>.</div>
<h2 id="Specification">Specification</h2>
<ul> <li>{{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.mspace","MathML 3.0 Presentation Markup mspace", "REC") }}</li>
</ul>
<h2 id="See_also">See also</h2>
<ul> <li>{{ MathMLElement("mpadded") }}</li> <li>{{ MathMLElement("mphantom") }}</li>
</ul>
Revert to this revision