Page 55 - modular_v2.0_HTML&_CSS_Fb
P. 55
THE <SUP> AND <SUB> TAGS
2
The <SUP> tag is used to turn the enclosed text into a superscript. For example, E=mc is coded
as E=mc<SUP>2</SUP>.
The <SUB> tag is used to turn the enclosed text into a subscript. For example, H O is coded as
2
H<SUB>2</SUB>O.
Example to display the Superscript and Subscript tag:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE> Superscript and Subscript </TITLE>
</HEAD>
<BODY>
<H1>The uses of Superscript and Subscript tags </H1>
<P> These tags are used to show text as superscript or subscript of
another text like chemical formulas or mathematical equations.</P>
<P><B>Example of Superscript text</B></P>
<P> (a + b)<SUP>2</SUP> = a<SUP>2</SUP> + b<SUP>2</SUP> + 2ab</P>
<P><B>Example of Subscript text</B></P>
<P>H<SUB>2</SUB>O</P>
<P>H<SUB>2</SUB>SO<SUB>4</SUB></P>
</BODY>
</HTML>
Using subscript and superscript tags
THE FONT PROPERTIES
In the earlier version of HTML, we used FONT tag to change or style the font such as changing
the shape, size and family of the font. But in HTML 5, the <FONT> tag is deprecated.
53
Formatting a Web Page

