JavaScript small()Method

String 对象参考手册JavaScript String Object

Definition and Usage

The small() method is used to display a string in a small font.

This method returns the string wrapped in the <small> tag, as shown below:

<small>string</small>

Syntax

string.small()


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the small() method.


Example

Example

Display a string using a small font size:

<script>

var str = "Hello world!";
document.write(str.small());

</script>

Try it Yourself »


String 对象参考手册JavaScript String Object Other Extensions