JavaScript String Object
The sub() method is used to display a string as subscript text.
This method returns the string embedded in the <sub> tag, like this:
<sub>string</sub>
![]()
The sub() method is supported in all major browsers.
Display string as subscript text:
JavaScript String Object
Your message has been sent to W3Schools.