HTML <font> sizeAttribute
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the size attribute.
Definition and Usage
HTML5 does not support the <font> tag. Use CSS instead.
In HTML 4.01, the size attribute of <font>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 <font> is deprecated. Use CSS instead.
CSS syntax: <p style="font-size:20px">
CSS Example: Set the size of text
In our CSS tutorial, you can find more details aboutthe font-size property.
Syntax
<font size="number">
Attribute Values
| Value | Description |
|---|---|
| number | Specifies the size of the text. Possible values: numbers from 1 to 7. The browser default value is 3. |
HTML <font> Tag Other Extensions