Subscript and Superscript code in Html

Subscript and Superscript code in Html. How to write subscript and superscript in blog-post using html code.

Subscript and Superscript code in Html

Subscript and Superscript code in Html
Subscript and Superscript code in Html

Html Subscript

A Html subscript is a symbol which appear smaller than the normal size and is written just below the text line, as shown below:

H2O

Below is the html Subscript code to put Subscript in your website or post

Text – “sub” is the tag to make subscript

eg of Html Subscript:
H<sub>2</sub>O  will make output

as H2O

Html superscript

A Html superscript is a symbol which appear smaller than the normal size and is written slightly above the text line, as shown below:

1st

below is the html code to put superscript in your website or blog post

For superscript – : your text – “sup” is the tag to make superscript

eg:
1<sup>st</sup> will make output as 1st

How to make superscript and subscript appear simultaneously

To make both appear, i.e Subscript and Superscript code in Html:

<sup>1<sub>1</sub></sup>H which will output as 11H

Leave a Reply

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