Computer Science, asked by anch7494, 7 months ago

what is the use of <sub>and <sup> tag explain with suitable example

Answers

Answered by anindyaadhikari13
35

Question:-

What is the use of <sub> and <sup> tag. Explain with suitable example.

Answer:-

The <sup> tag is used when we want to write anything in superscript.

For example,

If we want to write x raised to the power 3 i.e., \sf x^{3} then using <sup> tag, we can write this.

x<sup>3</sup>

Which gives output as,

 \boxed{\large\sf  {x}^{3}}

Similarly,

The <sub> tag is used when we want to write anything under subscript.

For example, if we want to write the formula of water(H2O) in website, then we can use <sub> tag to write "2" in subscript.

We can write as follows,

H<sub>2</sub>O

Which gives output as,

 \boxed{\large\sf H_{2}O}

These tags require a closing tag and hence they are called container tags.

Similar questions