Open In App

HTML5 MathMl scriptlevel Attribute

Last Updated : 18 Nov, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report

This attribute holds the value to controls over the font-size. It works like priority property which means the higher priority value have lower performance. It means the higher scriptlevel the smaller the font-size. This attribute is accepted by <mstyle> tag only.

Syntax:

<element scriptlevel="number">

Attribute Values:

  • number: This value is used to define the font-size, works like priority property which means the higher priority value have lower performance.

Below example illustrate the scriptlevel in HTML5 MathML:

Example:

HTML
<!DOCTYPE html> 
<html> 

<head> 
    <title>HTML5 MathML scriptlevel Attribute</title> 
</head> 

<body> 
    <center> 
        <h1 style="color:green"> 
            GeeksforGeeks 
        </h1> 

        <h3>HTML5 MathML scriptlevel Attribute</h3> 

        <math> 
            <mstyle displaystyle="true"
                    mathcolor="purple"
                    scriptlevel="2"> 
                <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> 

Output:

Supported Browsers: The browsers supported by HTML5 MathML scriptlevel attribute are listed below:

  • Firefox

Next Article

Similar Reads