: The SUB Element
Last updated: 2026-09-12
<sub>The SUB Element
Defines subscript text shown below the baseline, used in chemical formulas (e.g. H₂O) and math notation.
| Category | Formatting |
|---|---|
| Content Model | Phrasing content |
| Allowed Parents | Any element that accepts phrasing content |
| Content Tag | Yes — requires closing </sub> tag |
| Status | Standard |
📝 Syntax
<sub>subscript</sub>
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <sub> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: Subscript changes line height; use sparingly in long text to avoid uneven spacing.