HTML DOM Superscript Object

The Superscript object represents an HTML <sup> element

Superscript Object

The Superscript object represents an HTML <sup> element.

Access a Superscript Object

You can access a <sup> element by using getElementById():

Example

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

Create a Superscript Object

You can create a <sup> element by using the document.createElement() method:

Example

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

Standard Properties and Events

The Superscript object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <sup> tag

JavaScript reference: HTML DOM Subscript Object