Mastodon
99Tools.net

HTML Subscript Generator

Need to write chemical formulas or mathematical variables? Our HTML Subscript Generator makes it a breeze. Just enter your text, and we’ll instantly generate the correct HTML <sub> tag code for you to copy and paste anywhere.

The text that will appear smaller and lowered.
Live Preview

Subscript Code

HTML Subscript Code

Making Text Tiny and Low: Your Guide to the HTML Subscript Generator

Ever needed to write out a chemical formula like H₂O, or maybe a mathematical variable like x₁, and found yourself stuck? That little text that sits a bit lower than the rest is called “subscript,” and in HTML, it’s created with the <sub> tag. Our generator makes creating this effect super easy, so let’s dive in!

Building Your Text, Piece by Piece

Think of your final output as being made of three parts. You just need to tell the generator what goes in each slot:

  • Base Text: This is the main text that comes before the subscript. Using our water example, this would just be “H”.
  • Subscript Text: This is the star of the show! It’s the text that will be made smaller and lowered. For H₂O, this would be the “2”.
  • Suffix Text (Optional): This is anything you want to add after the subscript. To finish our H₂O example, you’d put “O” here.

Seeing is Believing: The Live Preview

You don’t have to guess what the final result will look like. As you type into the fields above, the Live Preview box will instantly update to show you the formatted text. What you see is exactly what you’ll get, so you can play around until it’s perfect.

Your Code is Ready!

Once you’re happy with the preview, you can grab the code from the output boxes below it:

  • Subscript Code: This is the one you’ll want most of the time. It gives you the clean HTML snippet of your complete text, ready to be dropped right into a paragraph on your website.
  • HTML Subscript Code: This box provides a full, basic HTML page with your subscript text inside. It’s super handy if you want to do a quick test in a separate file.

Just hit the Copy button, and you’re all set to add perfectly formatted subscript to your content!

RECOMMENDED
HTML Text Input Generator
Try Now