Open In App

HTML5 MathML depth Attribute

Last Updated : 16 Nov, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report

This attribute is used to set the depth or increase/decrease the depth of the content. This attribute is accepted by <mpadded> tag only.

Syntax:

<element depth="length">

Attribute Values:

  • length: This attribute sets or increments the depth.

Below example illustrate the depth attribute in HTML5 MathML:

Example:

HTML
<!DOCTYPE html> 
<html> 

<head> 
    <title>HTML5 MathML depth attribute</title> 
</head> 

<body style="text-align:center;"> 
    
    <h1 style="color:green"> 
        GeeksforGeeks 
    </h1> 
    
    <h3>HTML5 MathML depth attribute</h3> 
    
    <math> 
        <mpadded depth="20"> 
            <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 depth attribute are listed below:

  • Firefox

Next Article

Similar Reads