Explore a little.C ProgrammingC++HTMLVisual BasicSystem AnalysisE-CommerceBCA Notes
LEARN SOMETHING NEW

Subscripts and superscript in Html

Read4BCA learning libraryFree access

Subscripts and superscript in Html

Subscript text

<sub> tag defines subscript text
Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font.
Subscript text can be used to represent chemical formulas, eg.H2O


Superscript text

<sup>tag defines superscript text.
Superscript text appears half a character above the normal line, and sometimes rendered in smaller font.
Superscript text can be used to represent footnotes, eg. 52

Example:

<!DOCTYPE html>
<html>
<head>
<title>Insert and Delete tag</title>
</head>

<body>
Here is subscript=x<sub>2</sub><br>
Here is superscript=x<sup>2</sup><br>
</body>
</html>

Output of this code will look like this:

Subscripts and superscript in Html example

This lesson preserves the original Read4BCA material. Some programming examples use older tools and syntax. View original page.