HTML5 sup element, Example of <sub>  and <sup> tag of HTML5.


 

HTML5 sup element, Example of <sub>  and <sup> tag of HTML5.

In this section, you will see the use of <sub>  and <sup> of html5.

In this section, you will see the use of <sub>  and <sup> of html5.

HTML5 sup element, Example of <sub>  and <sup> tag of HTML5.

Introduction:

In this tutorial, you will see how to use <sub> and <sup> tag. The <sub> is used for defining subscript text. But 2 tag is used for superscript text in your document.

Declaration Syntax :

Declaration syntax of <sub> in HTML5.

                           <sub>subscript text</sub>


Declaration syntax of <sup> in HTML5.

                           <sup> superscript text</sup>

Example of <span> in HTML5:

Code:
Sub&Sup_Tag.html
<!doctype html >
<html>
<head><title>Insert title of document</title></head>
<body>
<h2>HTML5 &lt;sub&gt; and &lt;sup&gt; tag example.</h2>
<p>Subscript</p>
H<sub>2</sub>SO<sub>4</sub>
<p>Superscript</p>
Num<sup>2</sup>.
</body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

None.

Ads