HTML sup Tag
The <sup> tag in HTML describes the text as a superscript text. Here the text is above the baseline of the text and that text appears in a smaller font.
Syntax:
<sup> Content... </sup>
Example 1:
html
<!DOCTYPE html> < html > < head > < title >HTML sup Tag</ title > </ head > < body style="text-align: center;"> < h1 style="color: green;"> w3wiki </ h1 > < h3 >HTML <sup> Tag</ h3 > < p >a< sup >2</ sup ></ p > </ body > </ html > |
Output:
Example 2:
html
<!DOCTYPE html> < html > < head > < title > HTML sup Tag </ title > < style > sup { vertical-align: super; font-size: medium; } </ style > </ head > < body > < p > Examples to demonstrate superscript text </ p > < p >2 < sup >4</ sup >=16</ p > < p >X < sup >4</ sup >+ Y< sup >6</ sup ></ p > < p >9< sup >th</ sup > of september</ p > < p > Change the default CSS settings to see the effect. </ p > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome
- Edge 12 and above
- Internet Explorer
- Firefox 1 and above
- Apple Safari
- Opera