English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the usage of the HTML basefont size attribute, online examples demonstrate how to use the HTML basefont size attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc.
Specify the default font size of the text on the page:
<!DOCTYPE html> <html> <head> <title>HTML: <basefont> size attribute - Basic Tutorial Website oldtoolbag.com</a>/title> <basefont basefont size="7"> </head> <body> <h1>This is a heading</h1" <p>This is a paragraph.</p>/p> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
Except for Internet Explorer9.0 and earlier IE versions do not support the size attribute in other browsers.
Definition and Usage5 HTML
is no longer supported. Please use CSS instead. 4in HTML1The size attribute of <basefont> in HTML
has been deprecated.
Compatibility notes 4in HTML1 .0 1does not recommend the use of the face attribute of the basefont element; in XHTML
.0 Strict DTD does not support the face attribute of the basefont element.-CSS syntax (in the <head> section): <style>body{font 10size:/px</
Syntax<basefont size="number /"
Value | Description |
---|---|
font_family | Specifies the font of the text. To specify a priority list of several fonts, separate the font names with commas (for example, <basefont face="verdana,arial,sans-serif" /)。 |