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,#rrggbband HTML color names.
Examples
Sample rendering: 
Rendering in your browser:
<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
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
mphantom | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari Full support 6 | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
mathbackground | Chrome No support No | Edge No support No | Firefox Full support 4 | IE No support No | Opera No support No | Safari Full support 6 | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
Legend
- Full support
- Full support
- No support
- No support
