Contents
HTML Subscript: Main Tips
- To make plain text into a subscript HTML element, you should use
<sub>
tags. Both starting and ending tags must be used. - HTML subscript has a lower baseline and occupies less height than usual text.
- The
<sub>
tag does not have specific attributes, but supports global ones.
HTML Code for Subscript
By surrounding inline text with <sub>
tags, you turn it into subscript in HTML:
HTML subscript <sub>
tag uses this default CSS styling:
Tip: you can learn more about these properties in CSS vertical-align and fonts tutorials.

Pros Main Features
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable

Pros Main Features
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion

Pros Main Features
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
Using Subscript in HTML
You should only use HTML subscript for typographical reasons, for example:
- footnote numbers
- variable subscripts
- chemical formulas
Example
<!-- Here you can see footnote numbers: -->
<p>I do not like green eggs<sub>1</sub> and ham<sub>2</sub>!</p>
<!-- Here you can see variable subscripts: -->
<p>2<sub>3</sub>, 4<sub>5</sub>, x<sub>y</sub></p>
<!-- Here you can see chemical formulas: -->
<p>H<sub>2</sub>O, NaHCO<sub>3</sub>, C<sub>12</sub>H<sub>22</sub>O<sub>11</sub></p>
Tip: in other cases, use CSS styling properties.
Browser Support

Chrome
All

Edge
All

Firefox
1+

IE
All

Opera
All

Safari
All
Mobile Browser Support

Chrome
All

Firefox
4+

Opera
All

Safari
All