what is the use of <sub>and <sup> tag explain with suitable example
Answers
Answered by
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., then using <sup> tag, we can write this.
x<sup>3</sup>
Which gives output as,
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,
These tags require a closing tag and hence they are called container tags.
Similar questions