Skip to content
Related Articles

Related Articles

Improve Article

HTML5 MathMl scriptlevel Attribute

  • Last Updated : 18 Nov, 2020

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

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :