Open In App

HTML5 MathML height Attribute

Last Updated : 20 Nov, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

This attribute holds the height value length i.e. desired depth above the baseline. This attribute is accepted by three tags <mglyph>, <mpadded>, and <mspace>.

Syntax:

<element height="length">

Attribute Values:

  • length: This attribute sets or increments the depth.

Below example illustrate the height attribute in HTML5 MathML:

Example:

HTML




<!DOCTYPE html> 
<html
  
<head
    <title>HTML5 MathML height attribute</title
</head
  
<body style="text-align:center;"
      
    <h1 style="color:green"
        GeeksforGeeks 
    </h1
      
    <h3>HTML5 MathML height attribute</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>


Output:

Supported Browsers: The browsers supported by HTML5 MathML height attribute are listed below:

  • Firefox


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

Similar Reads