English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces how to specify the size of the text within the <font> element using the HTML font size property, with online examples demonstrating usage, browser compatibility, syntax definition, and detailed information about its attribute values.
Specify the size of the text:
!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <font> size property usage-Basic Tutorial(oldtoolbag.com)</title> </head> <body> <p><font size="6">This is some text!</font></p> <p>HTML5The color attribute is not supported, please use CSS instead.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the size attribute.
HTML5 The <font> tag is not supported. Please use CSS instead.
In HTML 4.01 In HTML, the size attribute of <font> has been deprecated.
The size attribute specifies the size of the text in the <font> element.
In HTML 4.01 In the <p style="font
CSS syntax: <p style="font-size:20px">
CSS Example: Set the size of the text
In our CSS tutorial, you can find more aboutfont-size attribute details.
<font size="number">
Value | Description |
---|---|
number | specify the size of the text. Possible values: from 1 to 7 The number. The default value of the browser is 3. |