The MathML <mphantom> element is rendered invisibly, but dimensions (such as height, width, and baseline position) are still kept.

Attributes

class, id, style
Provided for use with stylesheets.
mathbackground
The background color. You can use #rgb, #rrggbb and HTML color names.

Examples

Sample rendering: x+  z

Rendering in your browser: x + y + z

<math>

<mrow>
  <mi> x </mi>
  <mo> + </mo> 
  <mphantom>
    <mi> y </mi>
    <mo> + </mo>
  </mphantom>
  <mi> z </mi>
</mrow>

</math>

Specifications

Specification Status Comment
MathML 3.0
The definition of 'mphantom' in that specification.
Recommendation Current specification
MathML 2.0
The definition of 'mphantom' 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 Full support 6WebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
mathbackgroundChrome No support NoEdge ? Firefox Full support 4IE No support NoOpera No support NoSafari Full support YesWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 4Opera Android No support NoSafari iOS Full support 6Samsung Internet Android ?

Legend

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

See also

Document Tags and Contributors

Contributors to this page: fscholz, fred.wang, Sheppy, teoli, jswisher
Last updated by: fscholz,