Open In App

HTML5 MathML <math> tag

The MathML <math> tag in HTML5 is the most prioritized element. Whatever MathML element you want to use should be wrapped inside of the <math> tag.

Syntax: 



<math> child elements </math>

Attributes: The tag accepts some attributes which are listed below: 

Below example illustrates the MathML <math> tag in HTML5:



Example: 




<!DOCTYPE html>
<html>
 
<head>
    <title>HTML5 MathML math tag</title>
</head>
 
<body>
    <center>
        <h1 style="color:green">
            GeeksforGeeks
        </h1>
 
        <h3>HTML5 MathML math tag</h3>
 
        <math>
            <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>
        </math>
    </center>
</body>
 
</html>

Output: 

HTML5 Math tag

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


Article Tags :