MathML Subscript

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:

  1. <math xmlns=’http://www.w3.org/1998/Math/MathML’ display=’block’ >  
  2.   <msub>  
  3.     <mi>X</mi>  
  4.     <mn>1</mn>  
  5.   </msub>   
  6. </math>  

Attributes of Subscript Element

IndexAttributeDescription
1)class, id, styleIt is provided for use with stylesheets.
2)hrefIt is used to set a hyperlink to a specified uri.
3)mathbackgroundIt specifies background color. you can use #rgb, #rrggbb and html color names.
4)mathcolorIt specifies the text color. You can use #rgb, #rrggbb and html color names.
5)subscriptshiftIt specifies the minimum space by which to shift the subscript below the baseline of the expression, as a length value.

Supporting Browsers:

Elementchrome browser Chromeie browser IEfirefox browser Firefox (Gecko)opera browser Operasafari browser Safari
<msub>Not SupportedNot SupportedSupportedNot SupportedOnly Basic Support

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *