Sub Tag and Sup Tag in HTML5

In this article I am going to describe about the implementation and use of <sub> tag and <sup> tag in HTML5.
  • 2099

 Sub Tag in HTML5

<sub>  tag is used for defining subscript text in HTML5.

Syntax

<sub>Subscript Text</sub>

Sup tag in HTML5

<sup> tag is used for defining superscript text in HTML5.

Syntax

<sup>Superscript Tag<sup>

Example  of <sub> tag and <sup> tag in HTML5

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

<title>sub tag and sup tag in HTML5</title>

</head>

<body>

    <h1>Implementation Of sub tag and sup tag in HTML5</h1>

    <p>Subscript in HTML5</p>

    H<sub>2</sub>SO<sub>4</sub>

    <p>Superscript in HTML5</p>

    a<sup>3</sup>b<sup>3</sup>

    <hr />

    <footer>

        Designed By Ashwani Tyagi

    </footer>

    <hr />

</body>

</html>

Output

subSql.jpg

© 2020 DotNetHeaven. All rights reserved.