mathml element
<msub>
The <msub> MathML element is used to attach a subscript to an expression.
It uses the following syntax: <msub> base subscript </msub>.
Attributes
This element’s attributes include the global MathML attributes as well as the following deprecated attribute:
subscriptshiftDeprecated- : A
length-percentageindicating the minimum amount to shift the baseline of the subscript down.
- : A
[!NOTE] For the
subscriptshiftattribute, some browsers may also accept legacy MathML lengths.
Examples
<math display="block">
<msub>
<mi>X</mi>
<mn>1</mn>
</msub>
</math>
Interactive exampleOpen the canonical MDN source to run this embedded demo.
Technical summary
| Implicit ARIA role | None |
|---|
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
msup(Superscript)msubsup(Subscript-superscript pair)mmultiscripts(Prescripts and tensor indices)