Slide 1
Slide 2
Slide 3

sup and sub tags in HTML5 (HTML-V25)

No Comments

9.4. <sup> and <sub> Tags
To add superscript (raised) text or subscript (lowered) text inside a heading, you can use <sup> and <sub>.
Source Code:

Copied!
<!DOCTYPE html>
<html>
<head>
   <title>Using <sup> and <sub> Tags</title>
</head>
<body>
   <h4>The 10<sup>th</sup> floor is at the top.</h4>
   <h5>The chemical formula for water is H<sub>2</sub>O.</h5>
</body>
</html>

Result: 

Watch the video:


Ebook:
https://softkhpc.blogspot.com/2026/11/html-tutorial-beginners.html

back to top