Visit Mozilla.org

Core JavaScript 1.5 Reference:Global Objects:String:small

From MDC

Non-standard

Contents

[edit] Summary

Causes a string to be displayed in a small font, as if it were in a SMALL tag.

Method of String
Implemented in: JavaScript 1.0, NES2.0

[edit] Syntax

small()

[edit] Parameters

None.

[edit] Description

Use the small method with the write or writeln methods to format and display a string in a document. In server-side JavaScript, use the write function to display the string.

[edit] Examples

[edit] Example: Using string methods to change the size of a string

var worldString="Hello, world"

document.write(worldString.small())
document.write("<P>" + worldString.big())
document.write("<P>" + worldString.fontsize(7))

This example produces the same output as the following HTML:

<SMALL>Hello, world</SMALL>
<P><BIG>Hello, world</BIG>
<P><FONTSIZE=7>Hello, world</FONTSIZE>

[edit] See Also

big, fontsize