Horje
HTML <sup> Tag

Definition and Usage

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].

Tip: Use the <sub> tag to define subscript text.


Browser Support

Global Attributes

The <sup> tag also supports the Global Attributes in HTML.


Event Attributes

The <sup> tag also supports the Event Attributes in HTML.


How to create HTML <sup> Tag

It superscripts text.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The sub and sup elements</h1>

<p>This text contains <sub>subscript</sub> text.</p>
<p>This text contains <sup>superscript</sup> text.</p>

</body>
</html>

Output should be:

How to create HTML <sup> Tag

How to set Default CSS Settings in HTML <sup> Tag

Most browsers will display the <sup> element with the following default values.

index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
sup {
    vertical-align: super;
    font-size: smaller;
}
</style>
</head>
<body>

<p>A sup element is displayed like this:</p>

<p>This text contains <sup>superscript text</sup></p>

<p>Change the default CSS settings to see the effect.</p>

</body>
</html>

Output should be:

How to set Default CSS Settings in HTML <sup> Tag




html sup

Type:
Develop
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference