+ 2
" <p><sub> subscripted text </sub></p> <p><sup> superscripted text </sup></p> " What does <sup> and <sub> do.
5 odpowiedzi
+ 10
What do you wanna actually ask?
+ 8
https://www.sololearn.com/discuss/289796/?ref=app
https://www.sololearn.com/discuss/1963276/?ref=app
https://www.sololearn.com/discuss/476901/?ref=app
https://www.sololearn.com/discuss/12018/?ref=app
https://www.sololearn.com/discuss/76039/?ref=app
https://www.sololearn.com/discuss/29046/?ref=app
https://www.sololearn.com/discuss/2445213/?ref=app
https://www.sololearn.com/discuss/15661/?ref=app
https://www.sololearn.com/discuss/616150/?ref=app
<sup> : super scripted a²[above the baseline]
<sub> : sub scripted [below the baseline]
+ 2
According to w3 school
The <sub> tag defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, like H2O.
The <sup> tag defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font. Superscript text can be used for footnotes, like WWW[1].
example:
<p>base<sub>10</sub></p>
<p>CM<sup>2</sup></p>
check the output of that code It will help you
+ 1
If u need something like the square of a number to display something like x=x*x then u can use x <sup> 2 </sup> which will make a 2 to be on top of x
But to display an equation like the formula of water u shall need H <sub>2</sub>O to display the 2 lower than the H and O.
If u are still confused then practice it
0
"What do you wanna actually ask?" I am asking that what is the use of <sup> and <sub> tags