HTML5 MathML symmetric Attribute

If the stretchy attribute is set to true, it specifies if the operator should be vertically symmetric around the imaginary Math axis. This attribute is accepted by the <mo> tag only.

Syntax:

<element symmetric="true|false">

Attribute values:

  • true: It specifies the operator should be vertically symmetric around the imaginary math axis.
  • false: It specifies the operator should not be vertically symmetric around the imaginary math axis.

Example: Below example illustrates the symmetric attribute in HTML5 MathML.

HTML




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


Output:

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

  • Firefox