• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Programming Expert

Solving All of Your Programming Headaches

  • HTML
  • JavaScript
  • jQuery
  • PHP
  • Python
  • SAS
  • VBA
  • About
You are here: Home / HTML / HTML subscript – How to Lower Text in HTML

HTML subscript – How to Lower Text in HTML

December 26, 2021 Leave a Comment

To lower text in HTML we can use the HTML subscript tag <sub></sub>.

<sub>text</sub>

Let’s say I have the following HTML:

<div id="div1">The chemical formula for water is H2O</div>

If we want to lower the “2” in H2O, we can do this using the HTML subscript tag <sub></sub>.

<div id="div1">The chemical formula for water is H<sub>2</sub>O</div>

This would result in the following code:

The chemical formula for water is H2O

Other Articles You'll Also Like:

  • 1.  What is the Correct HTML for Adding a Background Color to a Div?
  • 2.  Sort List of Divs with Data Attribute with Radio Buttons Using Javascript
  • 3.  What is the Correct HTML for Making a Text Area?
  • 4.  HTML superscript – How to Raise Text in HTML
  • 5.  What is the Correct HTML for Making a Text Input Field?
  • 6.  What is the Correct HTML for Inserting a Background Image?
  • 7.  What Type of HTML List will Automatically Place a Number in Front of the Items?
  • 8.  Can a div Have Two ids?
  • 9.  How to Make a Div Scrollable in HTML
  • 10.  What is the Correct HTML for Making a Drop-Down List?

About The Programming Expert

The Programming Expert is a compilation of a programmer’s findings in the world of software development, website creation, and automation of processes.

Programming allows us to create amazing applications which make our work more efficient, repeatable and accurate.

At the end of the day, we want to be able to just push a button and let the code do it’s magic.

You can read more about us on our about page.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About The Programming Expert

the programming expert main image

The Programming Expert is a compilation of hundreds of code snippets to help you find solutions to your problems in Python, JavaScript, PHP, HTML, SAS, and more.

Search

Learn Coding from Experts on Udemy

Looking to boost your skills and learn how to become a programming expert?

Check out the links below to view Udemy courses for learning to program in the following languages:

Copyright © 2022 · The Programming Expert · About · Privacy Policy