MathML subscript is created with <msub> tag. It is used to attach a subscript to an expression. It uses the following syntax: <msub> base subscript </msub>.
For Example:
To write X1
Equivalent MathML code:
- <math xmlns=’http://www.w3.org/1998/Math/MathML’ display=’block’ >
- <msub>
- <mi>X</mi>
- <mn>1</mn>
- </msub>
- </math>
Attributes of Subscript Element
Index | Attribute | Description |
---|---|---|
1) | class, id, style | It is provided for use with stylesheets. |
2) | href | It is used to set a hyperlink to a specified uri. |
3) | mathbackground | It specifies background color. you can use #rgb, #rrggbb and html color names. |
4) | mathcolor | It specifies the text color. You can use #rgb, #rrggbb and html color names. |
5) | subscriptshift | It specifies the minimum space by which to shift the subscript below the baseline of the expression, as a length value. |
Supporting Browsers:
Element | Chrome | IE | Firefox (Gecko) | Opera | Safari |
<msub> | Not Supported | Not Supported | Supported | Not Supported | Only Basic Support |
Leave a Reply