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


Previous Article
Next Article

Similar Reads

HTML5 MathML rowspan Attribute
This attribute holds the value that how many rows does the cell extend. This attribute is accepted by the &lt;mtd&gt; tag only. Syntax: &lt;element rowspan="non-negative-int"&gt; Attribute Values: non-negative-int: This value holds the integer that create the span by rows. Below example illustrate the rowspan in HTML MathML: Example: C/C++ Code
1 min read
HTML5 MathML rowlines Attribute
This attribute holds the row borders value that multiple value can be separated by using a space can consider also. Possible values are none, solid and dashed. This attribute is accepted by &lt;mtable&gt; tag only. Syntax: &lt;element rowlines="none|solid|dashed"&gt; Attribute Values: none: This attribute sets the row lines of the table none.solid:
1 min read
HTML5 MathML selection Attribute
The MathML selection attribute in HTML5 is used to specify the child element that should be used for viewing. This value can be between 1 and the number of children of the element. The default value of this attribute is 1, which means that the first child element of all the options would be viewed by default. This attribute is accepted by the &lt;m
2 min read
HTML5 MathML columnlines Attribute
This attribute holds the border style value for the column-lines. The possible values are none, solid and dashed. This attribute is accepted by the &lt;mtable&gt; tag only. Syntax: &lt;element columnlines="none|solid|dashed"&gt; Attribute Values: none: This attribute sets the column lines of the table as "none". solid: This attribute sets the colum
1 min read
HTML5 MathML bevelled Attribute
This attribute holds the value for displaying any fraction. If the value is true then the numerator and the denominator are displayed side by side and separated by a slash. If the value is false (default value) , displayed numerator and denominator are on top of each other. This attribute is accepts &lt;mfrac&gt; tag. Syntax: &lt;element bevelled="
1 min read
HTML5 MathML accent Attribute
The MathML accent attribute in HTML5 is used to specify whether an operator should be treated as an accent. The possible values of this attribute are true or false. This attribute can be used with &lt;mo&gt;, &lt;mover&gt; and &lt;munderover&gt; MathML tags. Syntax: &lt;element accent="true | false"&gt; Attributes Value: This attribute has two valu
1 min read
HTML5 MathML accentunder Attribute
The MathML accentunder attribute is used to specify whether an element is treated as an accent or not. A value of true means that the accent is drawn closer to the base expression and a value of false means that a limit is drawn instead. The difference between the two is that a limit is reduced in size whereas an accent is the same size as the base
1 min read
HTML5 MathML href Attribute
The href attribute is used to specify the URL of the linked document. This attribute is accepted by all the MathML tags. Syntax: &lt;element href="valid URL"&gt; Attribute Value: href: This attribute is used to specify the URL of the linked document. Below example illustrate the href attribute in HTML5 MathML: Example: &lt;!DOCTYPE html&gt; &lt;htm
1 min read
HTML5 MathML framespacing Attribute
This attribute defines the space between the table and the frame. This attribute is accepted by &lt;mtable&gt; tag only. Syntax: &lt;element framespacing="number"&gt; Attributes Value: number: This attribute defines the space between the table and the frame. Below example illustrate the framespacing attribute in HTML5 MathML: Example: &lt;!DOCTYPE
1 min read
HTML5 MathML display Attribute
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 &lt;math&gt; tag only. Syntax: &lt;element display="block|in
1 min read