HTML5 | MathML <mpadded> Tag

The MathML <mpadded> tag in HTML5 is used to add extra padding and to set the general adjustment of position and size of enclosed contents.

Syntax:

<mpadded attribute="value"> </mpadded> 

Attributes:



  • class|id|style: This attribute is used to hold the styles of the child elements.
  • mathbackground: This attribute holds the value of the math expressions background color.
  • mathcolor: This attribute holds the color of the math expressions.
  • href: This attribute used to hold any hyperlink to a specified URL.
  • height This attribute is used to set the height or increase/decrease the height of the content.
  • width: This attribute is used to set the width or increase/decrease the width of the content.
  • depth: This attribute is used to set the depth or increase/decrease the depth of the content.
  • lspace: This attribute holds the value of the space length before the operator default value is thickmathspace (4.32px).
  • voffset This attribute is used to set the vertical position or increment that.

Below example illustrates the concept of HTML5 MathML <mpadded> tag:

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>HTML5 MathML mpadded tag</title>
</head>
  
<body style="text-align:center;">
      
    <h1 style="color:green">
        GeeksforGeeks
    </h1>
      
    <h3>HTML5 MathML <mpadded> Tag</h3>
      
    <math>
        <mpadded height="+150px" width="200px"
                    lspace="2height">
            <mrow>
                <mrow>
                    <msup>
                        <mi>x</mi>
                        <mn>2</mn>
                    </msup>
                    <mo>+</mo>
                    <msup>
                        <mi>y</mi>
                        <mn>2</mn>
                    </msup>
                </mrow>
                <mo>=</mo>
                <msup>
                    <mi>z</mi>
                    <mn>2</mn>
                </msup>
            </mrow>
        </mpadded>
    </math>
</body>
  
</html>

chevron_right


Output:

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

  • Firefox
  • Safari

full-stack-img




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.