Friday, December 23, 2016

HTML superscript and subscript Texts - Web Develpment

Superscript and subscript in HTML

If you want to use formulas in your web pages, Sometimes you should use square or cube signs in your formulas like A2. So you need to use superscript or subscript symbols in your web pages. For superscript the elements <sup></sup>, for subscript the elements <sub></sub> are using for these formula options

Example:

<p>a<sup>2</sup> + b<sup>2</sup> + 2 a b = (a+b)<sup>2</sup></p>

Example code for webpage :

<!DOCTYPE html>
<HEAD>
<TITLE>Web Development Example</TITLE>
<meta charset="UTF-8">
</HEAD>
<BODY>

<p>a<sup>2</sup> + b<sup>2</sup> + 2 a b = (a+b)<sup>2</sup></p>



</BODY>

</html>

Result of the above code:




Thank you to reading my blog. Manikandan. Will meet you in coming pages. If you have any doubt please comment in this blog, I will reply for your questions.



No comments:

Post a Comment