<msub>
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2023.
* Some parts of this feature may have varying levels of support.
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:
subscriptshift-
A
<length-percentage>indicating the minimum amount to shift the baseline of the subscript down.
Note:
For the subscriptshift attribute, some browsers may also accept legacy MathML lengths.
Examples
html
<math display="block">
<msub>
<mi>X</mi>
<mn>1</mn>
</msub>
</math>
Technical summary
| Implicit ARIA role | None |
|---|
Specifications
| Specification |
|---|
| MathML Core # subscripts-and-superscripts-msub-msup-msubsup |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
msub
|
|
|
|
|
|
|
|
|
|
|
|
|
subscriptshift
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Non-standard. Check cross-browser support before using.
- Deprecated. Not for use in new websites.
See also
<msup>(Superscript)<msubsup>(Subscript-superscript pair)<mmultiscripts>(Prescripts and tensor indices)