HTML5 MathML <mpadded> Tag
Last Updated :
10 Jul, 2023
Improve
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:
<!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="100px"
width="100px"
lspace="height">
<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>
Output:
Supported Browsers: The browsers supported by HTML5 MathML <mpadded> tag are listed below:
- Firefox
- Safari