Cover Image for HTML sub Tag
64 views

HTML sub Tag

The HTML <sub> tag is used to mark text that should be displayed as subscript, which means it appears slightly below the normal text baseline. Subscript text is commonly used for mathematical formulas, chemical formulas, footnotes, and other similar notations.

Here’s an example of how the <sub> tag can be used:

HTML
<p>H<sub>2</sub>O is the chemical formula for water.</p>

In the above example, the <sub> tag is used to display the number “2” as subscript, indicating that it is a subscripted element in the chemical formula for water (H2O).

The <sub> tag can be used with any text or alphanumeric characters to create subscripted content. It is typically rendered in a smaller font size and positioned slightly below the normal text baseline.

It’s important to note that the appearance of subscripted text may vary depending on the browser and the font used. Some browsers may render it as smaller and lowered text, while others may adjust the font size and positioning differently.

By using the <sub> tag appropriately, you can indicate subscripted content in your HTML documents, ensuring accurate representation of mathematical or scientific notations.

YOU MAY ALSO LIKE...

The Tech Thunder

The Tech Thunder

The Tech Thunder


COMMENTS