HTML5 | MathML <style> Tag

The MathML <style> tag is an inbuild tag in HTML5. This tag is used to change the styles of the children elements. This tag is applicable for the tags that included in the HTML5 MathML library.

Syntax:

<mstyle attribute="value"> children tags </style>

Attributes: This tag accepts some attributes which described below:



  • decimalpoint: This attribute holds the alignment value if the alignment value is described in decimal point.
  • dir: This attributes holds the direction value. Two types of direction values is acceptable ltr (left to right) and rtl (right to left).
  • displaystyle: This attributes holds the more vertical space that is used for displayed equations or, it is n a boolean value. If it is set to true then larger versions of operators are displayed. It partially depends on largeop and movablelimits of <mo> tag.
  • scriptlevel: This attribute holds the value to ctrols over the font-size. It works like priority propety which means the higher priority value have lower perfomance. It means the higher scriptlevel the smaller the font-size.
  • scriptminsize: This attribute holds the multiplier value that has been used to adjust font size due to changes in scriptlevel. Its default value is 0.71.

Below example illustrates the HTML5 MathMl <mstyle> tag:

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>HTML5 MathML <mstyle> tag</title>
</head>
  
<body>
    <center>
        <h1 style="color:green"
            GeeksforGeeks 
        </h1>
  
        <h3>HTML5 MathML <mstyle> tag</h3>
  
        <math>
            <mstyle displaystyle="true" 
                    mathcolor="lightgreen">
                <mrow>
                    <msubsup>
                        <mo>∑</mo>
                        <mn> i=1 </mn>
                        <mn> n </mn>
                    </msubsup>
                    <mo>+</mo>
                    <msub>
                        <mi>x</mi>
                        <mn>i</mn>
                    </msub>
                    <mo>=</mo>
                    <mn>?</mn>
                </mrow>
            </mstyle>
        </math>
    </center>
</body>
  
</html>

chevron_right


Output:

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

  • Firefox

full-stack-img




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.