THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

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 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