Display subscripted text in HTML


Use the <sub> tag to create subscripted text. The HTML <sub> tag is used for defining subscript text like,

x<sub>1</sub>+ x<sub>2</sub>

Example

You can try to run the following code to display subscripted text in HTML −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML sub Tag</title>
   </head>
   <body>
      Value of x<sub>1</sub> + x<sub>2</sub> = 17
   </body>
</html>

Updated on: 27-May-2020

115 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements