<msub>

Baseline 2023
Newly available

Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

We’d love to hear your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

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 Deprecated Non-standard

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

Specifications

Specification
MathML Core
# subscripts-and-superscripts-msub-msup-msubsup

Browser compatibility

See also