11. sub Tag
Introduction
Section titled “Introduction”The <sub> (subscript) element displays text below the normal baseline, making it smaller. It’s commonly used for chemical formulas, mathematical expressions, and footnotes. The sub element has semantic meaning, indicating that the text should be rendered as subscript.
Basic Usage
Section titled “Basic Usage”<p>Water: H<sub>2</sub>O</p>Common Use Cases
Section titled “Common Use Cases”Chemical Formulas
Section titled “Chemical Formulas”<p>Carbon dioxide: CO<sub>2</sub></p><p>Glucose: C<sub>6</sub>H<sub>12</sub>O<sub>6</sub></p>Mathematical Expressions
Section titled “Mathematical Expressions”<p>Logarithm: log<sub>2</sub>(x)</p>Footnotes
Section titled “Footnotes”<p>This is text with a footnote<sub>1</sub>.</p><p><sub>1</sub>This is the footnote content.</p>