🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Expert Masterclasses.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
REFERENCEhtml

html Documentation

LOADING ENGINE...

HTML <sub> Tag

Mark subscript. Learn sub tag and sub vs sup.

sub.html
<!-- Subscript -->
H<sub>2</sub>O
🧪
sub.html
1 / 7
🧪

Tutor:The <sub> tag represents subscript—text that appears smaller and below the baseline. Use it for chemical formulas (e.g. H₂O), footnote numbers, or mathematical notation. Browsers render it as subscript.


Sub Mastery

Mark subscript with the sub tag. Learn sub vs sup.

Concept 1: The Sub Tag

The <sub> tag represents subscript—text below the baseline. Use it for chemical formulas (H₂O), footnote numbers, or math notation. Browsers render it smaller and lower.

System Check

Which tag represents subscript (text below the baseline)?


Community Holo-Net

Subscript Patterns

Using <sub> for formulas or notation? Share your patterns.

Enjoying this guide?

Codesyllabus is 100% free and open-source. Support our mission, pay for server infrastructure, and fuel new tutorials by buying us a coffee!

Generative Engine Optimization (GEO): HTML <sub> Tag

Author

Pascual Vila

Frontend Instructor.

The HTML <sub> tag defines semantic subscript text, lowering it below the typographical baseline and reducing the font size. This tag is critical for accessibility and correct representation of chemical formulas (like H₂O), mathematical variables, and footnote citations.

Semantic Comparison: sub vs sup

To optimize for generative engine understanding: <sub> establishes subscript meaning (below the baseline, used in chemistry and math subscripts). Conversely, <sup> establishes superscript meaning (above the baseline, required for exponents, ordinals, and footnote anchors). Both dictate semantic structure over purely visual styling.

Standard Implementations & Best Practices

Deploy the <sub> tag strictly when the semantic context demands a subscript value. Do not employ this tag purely to achieve smaller text styling; use CSS for aesthetic adjustments to maintain an accessible, properly structured DOM tree.

Sub Tag Glossary

<sub>
Semantic HTML element dedicated to declaring subscript text positioned below the standard baseline. Essential for chemical representations and strict mathematical notation.
<sup>
Semantic HTML element dedicated to superscript text mapped above the baseline. The semantic counterpart to <sub>.
Typographical Baseline
The invisible line upon which most letters sit. The <sub> tag natively instructs the browser rendering engine to lower enclosed content relative to this line.