What is the difference between sub & sup? Why we use those tag? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What is the difference between sub & sup? Why we use those tag?

24th Feb 2017, 6:02 PM
Jahidul
Jahidul - avatar
7 Answers
+ 8
use Code playground to see the difference. sup helps for example to create footnotes. sub helps for example to create chemical formulas.
24th Feb 2017, 6:35 PM
Mario L.
Mario L. - avatar
+ 1
For example...you want to write H(square)O...then use sup. and H2O (water) then use sub. 😃
20th Apr 2017, 11:43 AM
Sirajuddaula AraFat
Sirajuddaula AraFat - avatar
0
<html> <head> <title>Первая страница</title> </head> <body> <p>Обычный текст</p> <p><b>Текст жирным шрифтом</b></p> <p><big>Текст крупным шрифтом</big></p> <p><i>Текст курсивом</i></p> <p><small>Текст мелким шрифтом</small></p> <p><strong>Важный текст</strong></p> <p>this is <sub>Подстрочный текст</sub> diffirent </p> <p>and this is <sup>Надстрочный текст</sup> diffirent </p> <p><ins>Вставленный текст</ins></p> <p><del>Удаленный текст</del></p> </body> </html> (Use this code to understand
20th Apr 2017, 10:30 PM
Atajan Charyew
Atajan Charyew - avatar
0
For example we have to write H2O then we use subscript and if we have to raise some number to power like x^2 then we superscript
19th Nov 2018, 5:29 AM
piyush kumar
piyush kumar - avatar
0
That is the language that the robot understand
22nd Nov 2018, 6:55 PM
Abu-bakr Abdullah
0
The <sup> tag defines superscript text. Superscript text can be used for footnotes. The <sub> defines subscript text.Subscript text can be used for chemical formulas.
23rd Nov 2018, 10:57 PM
Aishatu hamidu saidu
Aishatu hamidu saidu - avatar
- 1
example: a sub 0 = a not (with 0 in foot of a) a sup 0 =1 (power of a is 0 here) hope this helps..
14th Apr 2017, 3:21 PM
Raghav Gupta
Raghav Gupta - avatar