HTML font size Attribute

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">


<font size="text-size">

Syntax Example

<font size="6">

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.


Source Output
<font size="4">
<p>God is great</p>
God is great
HTML font size Attribute Reviewed by 1000sourcecodes on 04:18 Rating: 5
Powered by Blogger.