Display subscripted text in HTML

HTMLWeb DevelopmentFront End Technology

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>
raja
Published on 13-Mar-2018 14:46:38
Advertisements