Latest web development tutorials

HTML font size property

HTML font tags Reference Manual HTML <font> tag

Examples

Predetermined size of the text:

<font size="6">This is some text!</font>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the size attribute.


Definition and Usage

HTML5 does not support the <font> tag. Please be replaced with CSS.

In HTML 4.01, <font> The size attribute obsolete .

size attribute specifies the <font> element Chinese present size.


Compatibility Notes

In HTML 4.01, <font> The size attribute is discarded. Please be replaced with CSS.

CSS Syntax: <p style = "font-size: 20px">

CSS Example: set the size of the text

In our CSS tutorial you can find more information about the font-size property detail.


grammar

<font size="number">

Property Value

描述
number 规定文本的尺寸大小。可能的值:从 1 到 7 的数字。浏览器默认值是 3。


HTML font tags Reference Manual HTML <font> tag