Skip to content
Related Articles

Related Articles

Improve Article

HTML5 MathML display Attribute

  • Last Updated : 20 Nov, 2020

This attribute holds the value of rendering of HTML element. There can be two value block which means that this element will be displayed outside the current span of text, inline which means that this element will be displayed inside the current span of text. This attribute is accepted by <math> tag only.

Syntax:

<element display="block|inline">

Attribute Values:

  • block: This value defines that the element will be displayed outside the current span of text.
  • inline: This value defines that the element will be displayed inside the current span of text.

Below example illustrate the display attribute of HTML5 MathML:

Example:



HTML




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

Supported Browsers: The browsers supported by display 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 :