HTML size property
Example
Specifying the size of text:
This is some text!
Try it »
Browser support





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 tag