Skip to content
Related Articles

Related Articles

Improve Article

HTML5 MathML stretchy Attribute

  • Last Updated : 18 Nov, 2020

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:

  • true: This value defines the operator stretches to the size of the adjacent element.
  • false: This value defines the operator stretches not to the size of the adjacent element.

The below example illustrates the stretchy Attribute:

Example:



HTML




<!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:

  • Firefox

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :