<sup> HTML Tag

In this article we will discuss about how to use the superscript tag in HTML.
  • 2299

<sup> tag stands for superscript. It is used to define the superscript tag. The subscript tag in HTML put the text just above the baseline. It is used in making mathematical formulas.

HTML Code:

<html>

<head>

    <title></title>

</head>

<body>

    My First formula is a<sup>2</sup>+b<sup>2</sup>+2ab<br>

    My Second formula is a<sup>2</sup>+b<sup>2</sup>-2ab<br>

    My third formula is a<sup>3</sup>+b<sup>3</sup>+3a<sup>2</sup>b+3ab<sup>2</sup><br>

    My Four formula is a<sup>3</sup>-3a<sup>2</sup>b+3ab<sup>2</sup>-b<sup>3</sup>

</body>

</html>

Output:

My First formula is a2+b2+2ab
 My Second formula is a2+b2-2ab
 My third formula is a3+b3+3a2b+3ab2
 My Four formula is a3-3a2b+3ab2-b3
 

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2019 DotNetHeaven. All rights reserved.