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 <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).

Note that some common attributes like mathcolor, mathvariant or dir have no effect on <mspace>.

Examples

<math>

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

  <mspace width="100px" />

</math>

Specifications

Specification Status Comment
MathML 3.0
The definition of 'mspace' in that specification.
Recommendation Current specification
MathML 2.0
The definition of 'mspace' in that specification.
Recommendation Initial specification

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome No support NoEdge ? Firefox Full support 1IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
linebreakChrome No support NoEdge ? Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android ?
depthChrome No support NoEdge ? Firefox Full support 1IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
heightChrome No support NoEdge ? Firefox Full support 1IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
widthChrome No support NoEdge ? Firefox Full support 1IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

Gecko-specific notes

  • Indentation attributes are not implemented yet (for Gecko see bug 534962).
  • Support for negative values for the width attribute has been implemented in Gecko 23.0 (Firefox 23.0 / Thunderbird 23.0 / SeaMonkey 2.20).

See also

Document Tags and Contributors

Contributors to this page: fscholz, Sheppy, jswisher
Last updated by: fscholz,