Easy Tutorial
❮ Prop Radio Checked Prop Col Span ❯

JavaScript fontsize() Method


Definition and Usage

The fontsize() method is used to display a string in the specified size.

This method returns the string with the <font> tag, as shown below:

<font size="size">string</font>

Syntax

Parameter Description
size Required. The size parameter must be a number from 1 to 7.

Browser Support

All major browsers support the fontsize() method.


Example

Display a string with the specified size:

❮ Prop Radio Checked Prop Col Span ❯