Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript sup() Method

JavaScript sup() Method

String Object Reference JavaScript String object


Definition and Usage

The sup() method is used to display a string as a superscript.

This method returns a string with the tag added, as follows:

string

Syntax

string

.sup()


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the sup() method.


Example

Example

Display the text string as a superscript:

Try it »


String Object Reference JavaScript String object