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

HTML font size Attribute

HTML size property

HTML font Tag Reference HTML tag

Example

Specifying the size of text:

This is some text!

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the size property.


Definition and Usage

HTML5 does not support tag. Please use CSS instead.

In HTML 4.01, the size attribute is deprecated.

The size attribute specifies the size of the text in the element.


Compatibility notes

In HTML 4.01, The size attribute is deprecated. Please use CSS instead.

CSS syntax:

CSS example: setting the size of text

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


Syntax

Attribute values

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

HTML font Tag Reference HTML tag