HTML font size Attribute
HTML <font> tag
Definition and Usage
The size attribute specifies the font size of the content within the font
element.
Compatibility Notes
The font element was deprecated in HTML 4.01
and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax: <p style="font-size: 10px">
In our CSS tutorial you can find more details about the
font-size property.
Syntax
Syntax Example
Attribute Values
Value |
Description |
text-size |
Specifies the default font size for the text/elements
within the font element. Possible values are 1 to 7. Browser default is 3.
|
Browser Support

The attribute is deprecated, but still supported in all major browsers.
Example
Source |
Output |
<font size="4">
<p>Welcome to W3Schools</p>
</font> |
Welcome to W3Schools
|
Try-It-Yourself Demos
font size
attribute example
Set the font size of a group of elements with the font size attribute.
In CSS:
text size example
Set the font size of a single, and a group of elements with CSS.
HTML <font> tag
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|