Open In App

HTML5 MathML stretchy Attribute

This attribute defines whether the operator stretches to the size of the adjacent element or not. Possible values are true or false. This attribute is accepted by the <mo> tag only.

Syntax:



<element stretchy="true|false">

Attribute Values:

The below example illustrates the stretchy Attribute:



Example:




<!DOCTYPE html> 
<html
<body style="text-align:center;"
    <h1 style="color:green"
        GeeksforGeeks 
    </h1
    <h3>HTML5 MathML stretchy Attribute</h3
    <math
        <mrow
            <mrow
                <msup
                    <mi>x</mi
                    <mn>2</mn
                </msup
                <mo stretchy="true">+</mo
                <msup
                    <mi>y</mi
                    <mn>2</mn
                </msup
            </mrow
            <mo stretchy="false">=</mo
            <msup
                <mi>z</mi
                <mn>2</mn
            </msup
        </mrow
    </math
</body
</html

Output:

The output of the above code

Supported Browsers: The browsers supported by stretchy attribute are listed below:


Article Tags :