🚀 Elevate your text game with HTML! Need to raise text?

mritunjaysaha

Mritunjay Saha

Posted on December 7, 2023

🚀 Elevate your text game with HTML! Need to raise text?

Ever wondered how to add a superscript or subscript in HTML as we did while solving maths in high school?

We are used to add the superscript or subscript in google docs or microsoft word using which looked like this.
Superscript and Subscript

How to achieve superscript and subscript in HTML?

In HTML we can achieve the same using the tags for superscript and for subscript

<p>Example of superscript: (a + b)<sup>2</sup></p>
<p>Example of subscript: F<sub>n</sub> = F<sub>n-1</sub> + F<sub>n-2</sub></p>
Enter fullscreen mode Exit fullscreen mode

Output

Example of superscript: (a + b)2

Example of subscript: Fn = Fn-1 + Fn-2

💖 💪 🙅 🚩
mritunjaysaha
Mritunjay Saha

Posted on December 7, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related