Superscript and Subscript tag are used for move characters up and down.
- Superscript Tag <sup>...</sup> is used in mathematics[exponents] etc.
Ex: x2+y2=1.
- Subscript Tag <sub>...</sub> is used binary number base ,chemistry,differntial equations.
Ex: (0001)2 , x1 , x2 , H2SO4
Code for <sup>:
<!DOCTYPE html>
<html>
<head>
<title>sup and sub</title>
</head>
<body>
<p>x<sup>2</sup>+y<sup>2</sup>=1</p>
<p>x<sup>3</sup>+y<sup>3</sup></p>
<p>x<sup>4</sup>+y<sup>4</sup></p>
</body>
</html>
Superscript tag <sub>
Code for <sub>:
<!DOCTYPE html>
<html>
<head>
<title>sup and sub</title>
</head>
<body>
<p>(0001)<sub>2</sub></p>
<p>x<sub>1</sub>,x<sub>2</sub></p>
<p>H<sub>2</sub>SO<sub>4</sub></p>
</body>
</html>
Subscript tag
Superscript | Subscript |
---|---|
x2+y2=1 | (0001)2 |
x3+y3 | x1,x2 |
x4+y4 | H2SO4 |
Post a Comment