Easy Tutorial
❮ Att Textarea Cols Att Colgroup Char ❯

HTML <font> size Attribute

HTML <font> Tag

Example

Specify the size of the text:


Browser Support

All major browsers support the size attribute.


Definition and Usage

In HTML 4.01, the size attribute of the <font> tag is deprecated.

The size attribute specifies the size of the text in the <font> element.


Compatibility Notes

In HTML 4.01, the size attribute of the <font> tag is deprecated. Use CSS instead.

CSS syntax: <p style="font-size:20px">

CSS Example: Set the size of the text

In our CSS tutorial, you can find more details about the font-size property.


Syntax

Attribute Values

Value Description
number Specifies the size of the text. Possible values: a number from 1 to 7. The default value in browsers is 3.

❮ Att Textarea Cols Att Colgroup Char ❯