Home Tutorial Html Html5 HTML5 sup element, Example of <sub>  and <sup> tag of HTML5.

 
 

HTML5 sup element, Example of <sub>  and <sup> tag of HTML5.
Posted on: September 14, 2010 at 12:00 AM
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.

Related Tags for HTML5 sup element, Example of <sub>  and <sup> tag of HTML5.:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.