HTML DOM Superscript Object

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”);

Try it Yourself »

Create a Superscript Object

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

Example

var x = document.createElement(“SUP”);

Try it Yourself »

Standard Properties and Events

The Anchor object also supports the standard properties and events.