HTML DOM Subscript Object

Subscript object

The Address object represents the HTML <sub> element.

Access the Subscript object

You can use getElementById() to access the <sub> element:

var x = document.getElementById("mySub");

Try It Yourself

Create a Subscript object

You can use the document.createElement() method to create a <sub> element:

var x = document.createElement("SUB");

Try It Yourself

Standard Properties and Events

Subscript Object Supports StandardsPropertiesandEvents.

Related Pages

HTML Tutorial:HTML Text Formatting Elements

HTML Reference Manual:HTML <sub> Tag

JavaScript Reference Manual:HTML DOM Superscript Object