HTML5 | MathML <mspace> Tag

The MathML <mspace> tag in HTML5 is used to print blank space. The size of the blank space has to be mentioned in the attributes.

Syntax:

<mspace attributes="value"/>

Attributes: This tag accepts some attributes which are listed below:



  • class|id|style: This attribute holds the styles of the child elements.
  • mathbackground: This attribute holds the value of the math expressions background color.
  • depth: This attribute holds the depth value length i.e. desired depth below the baseline.
  • width: This attribute holds the width value length.
  • height: This attribute holds the height value length i.e. desired depth above the baseline.
  • linebreak: This attribute defines the linebreak inside of a line. Possible values are auto, newline, nobreak, goodbreak, and badbreak.

Below example illustrates the MathML <mspace> tag in HTML5:

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>HTML5 MathML mfenched tag</title>
</head>
  
<body>
    <center>
        <h1 style="color:green"
            GeeksforGeeks 
        </h1>
  
        <h3>HTML5 MathML <mspace> tag</h3>
  
        <math>
            <mfenced open="(" close=")" separators="">
                <mrow>
                    <msup>
                        <mi>x</mi>
                        <mn>2</mn>
                    </msup>
                    <mspace depth="20px" height="40px" />
                    <mo>+</mo>
                    <msup>
                        <mi>y</mi>
                        <mn>2</mn>
                    </msup>
                    <mo>=</mo>
                    <msup>
                        <mi>z</mi>
                        <mn>2</mn>
                    </msup>
                </mrow>
            </mfenched>
        </math>
    </center>
</body>
  
</html>

chevron_right


Output:

Supported Browsers: The browsers supported by HTML5 MathML <mspace> tag are listed below:

  • Firefox


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.