Open In App

HTML5 | MathML <msub> Tag

Last Updated : 22 Aug, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

The MathML <msub> tag in HTML is used to print the base power on any expression. 

Syntax: 

<msub> Contents </msub>

Attributes: This tag accepts some attributes which are listed below:  

  • class|id|style: This attribute holds the style of the contents.
  • mathbackground: This attribute holds the value of the math expressions background color.
  • href: This attribute holds any hyperlink to a specified URL.
  • mathcolor: This attribute holds the color of the math expressions.
  • subscriptshift: This attribute defines the minimum space that shift the subscript below the baseline of the expression.

Below example illustrates the MathML <msub> tag in HTML5:
Example:  

html




!DOCTYPE html>
<html>
 
<head>
    <title>HTML5 MathML msub tag</title>
</head>
 
<body>
    <center>
        <h1 style="color:green">
            GeeksforGeeks
        </h1>
 
        <h3>HTML5 MathML <msub> tag</h3>
 
        <math>
            <mfenced open="(" close=")" separators="">
                <mrow>
                    <msub subscriptshift="5px">
                        <mi>x</mi>
                        <mn>2</mn>
                    </msub>
                    <mo>+</mo>
                    <msub>
                        <mi>y</mi>
                        <mn>2</mn>
                    </msub>
                    <mo>=</mo>
                    <msub subscriptshift="5px">
                        <mi>z</mi>
                        <mn>2</mn>
                    </msub>
                </mrow>
            </mfenched>
        </math>
    </center>
</body>
 
</html>                   


Output:  

Supported Browsers: The browsers supported by HTML5 MathML <msub> tag are listed below:  

  • Firefox
  • Safari

 



Previous Article
Next Article

Similar Reads

HTML5 MathML &lt;menclose&gt; Tag
The HTML5 MathML &lt;menclose&gt; tag tag is an inbuilt element in HTML5. It is used to renders the contents which is inside of anbenclosing notation specified by the notation attribute. Syntax: &lt;menclose attribute="value "&gt; child elements &lt;/menclose"&gt;Attributes: The tag accepts some attributes which are listed below: class| id| style:
2 min read
HTML5 MathML &lt;merror&gt; Tag
The HTML5 MathML &lt;merror&gt; tag tag is an inbuilt element in HTML5 which is used to wrap the expression in a box, makes that expression eye-catching. This tag is used to display the error message. Normally it alone can't just pop out when your MathML markup is wrong or any kind of error occurs, you will get an XML parsing. Syntax: &lt;merror
2 min read
HTML5 MathML &lt;maction&gt; tag
The HTML5 MathML &lt;maction&gt; tag is an inbuilt element of HTML5, that is used to show the bind action of any expression. You can use any selection attribute with this element. Syntax: &lt;maction&gt; child elements &lt;/maction&gt; Attributes: The &lt;maction&gt; tag accepts below-mentioned attributes: actiontype: This attribute contains three
2 min read
HTML5 MathML &lt;mfrac&gt; tag
The HTML5 MathML &lt;mfrac&gt; tag is an inbuilt element in HTML5. It is use to add fraction symbol between two digits or equations. Syntax: &lt;mfrac&gt; numerator denominator &lt;/mfrac&gt; Attributes: This tag accepts below mentioned attribute: bevelled: This attribute holds the value how the fraction will be displayed if the value is true then
2 min read
HTML5 MathML &lt;mglyph&gt; Tag
The MathML &lt;mglyph&gt; tag in HTML5 is used to print non-standard symbols. It is used only for those characters or symbols that are not available on Unicode characters. Syntax: &lt;mglyph src="pathe" alt="" width="value" height="value"/&gt;Attributes: This tag accepts some attributes which are listed below: alt: This attribute defines the altern
1 min read
HTML5 MathML &lt;mn&gt; Tag
The MathML &lt;mn&gt; tag in HTML5 is used to display a numeric character which is normally a sequence of digits with a possible separator. It contains the arbitrary character and used like 4 as Four. Syntax: &lt;mn&gt; Numeric &lt;/mn&gt;Attributes: It accepts some attributes which are listed below: class|id|style: This attribute is used to hold t
2 min read
HTML5 MathML &lt;mlabeledtr&gt; tag
The MathML &lt;mlabeledtr&gt; tag in HTML5 is used to represent a label in a row, either on the left or on the right side inside of the &lt;mtable&gt; element. Child of this element is similar to normal table followed by m like &lt;td&gt; become &lt;mtd&gt;. Syntax: &lt;mlabeledtr&gt; element &lt;/mlabeledtr&gt; Attributes: This tag accepts some at
2 min read
HTML5 MathML &lt;mfenched&gt; tag
The MathML &lt;mfenched&gt; tag in HTML5 is used to add custom open and closing parentheses. Like you can open any parentheses and can close different brackets and separators. Syntax: &lt;mfenced open="parentheses" close="parentheses" separators=" "&gt; child elements&lt;/mfenced&gt;Attributes: This tag accepts some attribute which are listed below
1 min read
HTML5 MathML &lt;math&gt; tag
The MathML &lt;math&gt; tag in HTML5 is the most prioritized element. Whatever MathML element you want to use should be wrapped inside of the &lt;math&gt; tag. Syntax: &lt;math&gt; child elements &lt;/math&gt; Attributes: The tag accepts some attributes which are listed below: class|id|style: This attribute is used to hold the styles of the child e
2 min read
HTML5 MathML &lt;mi&gt; Tag
The MathML &lt;mi&gt; tag in HTML5 is used as an identifier such as any kind of symbol or function. You can put any statement inside this tag. Syntax: &lt;mi&gt; element &lt;/mi&gt; Attributes: This tag accepts some attributes which are listed below: class|id|style: This attribute is used to hold the styles of the child elements.href: This attribut
2 min read