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: 2020-05-27T22:07:44+05:30

197 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements