-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
49 lines (33 loc) · 1.19 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
title: <msub>
slug: Web/MathML/Element/msub
page-type: mathml-element
browser-compat: mathml.elements.msub
---
{{MathMLRef}}
The **`<msub>`** [MathML](/en-US/docs/Web/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](/en-US/docs/Web/MathML/Global_attributes) as well as the following deprecated attribute:
- `subscriptshift` {{deprecated_inline}} {{Non-standard_Inline}}
- : A {{cssxref("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](/en-US/docs/Web/MathML/Values#legacy_mathml_lengths).
## Examples
```html
<math display="block">
<msub>
<mi>X</mi>
<mn>1</mn>
</msub>
</math>
```
{{EmbedLiveSample('Examples')}}
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{ MathMLElement("msup") }} (Superscript)
- {{ MathMLElement("msubsup") }} (Subscript-superscript pair)
- {{ MathMLElement("mmultiscripts") }} (Prescripts and tensor indices)