Open In App

HTML5 | MathML <mspace> Tag

Last Updated : 08 Nov, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

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:




<!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>


Output:

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

  • Firefox


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads