+ 1
How do I make superscript and subscript text in HTML?
How do I make superscript and subscript text in HTML?
3 Answers
+ 3
By putting the text inside <sub></sub> or <sup></sup> tags.
+ 1
And you can also apply CSS and do absolutely the same, especially since you can customize the text and make it superscripted or subscripted as you want by using pixels. ( positive value for superscript, negative value for subscript ) Look:
<style>
<!â for superscripted text â>
p{ vertical-align: sup; }
<!â for subscripted text â>
p{ vertical-align: sub; }
<!â for superscripted text â>
p{ vertical-align: 10px; }
<!â for subscripted text â>
p{ vertical-align: -10px; }
</style>
I hope this helped you!( for more explanations, you can read lesson 14.1 of the CSS course ) ^^ Have a good day!
0
Thanks!