Open In App

HTML5 MathML <mfrac> tag

The HTML5 MathML <mfrac> tag is an inbuilt element in HTML5. It is use to add fraction symbol between two digits or equations.

Syntax: 



<mfrac> numerator denominator </mfrac> 

Attributes: This tag accepts below mentioned attribute: 

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



Example: 




<!DOCTYPE html>
<html>
 
<head>
    <title>HTML5 MathML mfrac tag</title>
</head>
 
<body>
    <center>
        <h1 style="color:green">
            GeeksforGeeks
        </h1>
 
        <h3>HTML5 MathML mfrac tag</h3>
 
        <math>
            <mfrac bevelled="true">
                <mfrac>
                    <msup>
                        <mi>x</mi>
                        <mn>2</mn>
                    </msup>
                    <msup>
                        <mi>y</mi>
                        <mn>2</mn>
                    </msup>
                </mfrac>
                <mfrac>
                    <msup>
                        <mi>a</mi>
                        <mn>2</mn>
                    </msup>
                    <msup>
                        <mi>b</mi>
                        <mn>2</mn>
                    </msup>
                </mfrac>
            </mfrac>
        </math>
    </center>
</body>
 
</html>

Output: 

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


Article Tags :