Open In App

HTML5 MathML display Attribute

Last Updated : 20 Nov, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

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


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads