Open In App

HTML5 MathML subscriptshift Attribute

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

The MathML subscriptshift attribute in HTML5 is used to define the minimum amount by which the subscript is shifted below the baseline of the expression. The length value can be specified using any CSS length unit. This attribute is accepted by the <mmultiscripts>, <msub>, and <msubsup> tags.

Syntax:

<element subscriptshift="length">

Attribute Values: This attribute has a single value as mentioned above and described below:

  • length: This value holds the amount by which the subscript would be shifted below the baseline.

The example below illustrates the MathML subscriptshift attribute:

Example:

HTML




<!DOCTYPE html>
<html>
  
<body>
    <center>
        <h1 style="color:green">
            GeeksforGeeks
        </h1>
  
        <h3>
            HTML5 MathML subscriptshift Attribute
        </h3>
          
        <math>
            <mfenced>
                <mrow>
                    <msub>
                        <mi>x</mi>
                        <mn>2</mn>
                    </msub>
                    <mo>+</mo>
                    <msub subscriptshift="15px">
                        <mi>y</mi>
                        <mn>2</mn>
                    </msub>
                    <mo>=</mo>
                    <msub subscriptshift="25px">
                        <mi>z</mi>
                        <mn>2</mn>
                    </msub>
                </mrow>
            </mfenced>
        </math>
    </center>
</body>
  
</html>


Output:

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

  • Firefox


Next Article

Similar Reads