Open In App

HTML5 MathML width Attribute

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

This attribute is used to set the width or increase/decrease the width of the content. This attribute is accepted by <mglyph>, <mpadded>, <mspace>, and <mtable> tags.

Syntax:

<element width="length">

Attribute Values:

  • length: Holds the digit in specific unit, that much width will be define.

Below example illustrate the width in HTML5 MathML:

Example: 

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>HTML5 MathML width Attribute</title>
</head>
  
<body style="text-align:center;">
  
    <h1 style="color:green">
        GeeksforGeeks
    </h1>
  
    <h3>HTML5 MathML width Attribute</h3>
  
    <math>
        <mrow>
            <mpadded lspace="2em" voffset="1em" 
                height="1em" depth="3em" width="7em">
                  
                <mfrac>
                    <mn>987654</mn>
                    <mn>20</mn>
                </mfrac>
            </mpadded>
        </mrow>
    </math>
</body>
  
</html


Output: 

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

  • Firefox


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

Similar Reads