HTML <basefont> sizeAttribute

HTML basefont 标签参考手册HTML <basefont> Tag

Examples

Specify the default font size on a page:

<head>
<basefont size="7" />
</head>

<body>
<h1>This is a header</h1>
<p>This is a paragraph</p>
</body>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Except Internet Explorer 9.0 and earlier IE versions, other browsers do not support the size attribute.


Definition and Usage

HTML5 no longer supports the <basefont> tag. Please use CSS instead.

The size attribute of <basefont> is deprecated in HTML 4.01.

The size attribute specifies the default size (font size) of text in a document.


Compatibility Notes

In HTML 4.01, the face attribute of the basefont element is deprecated; in XHTML 1.0 Strict DTD, the face attribute of the basefont element is not supported.

CSS Syntax (<head> section): <style>body{font-size: 10px}</style>

CSS Example: Specify the default text font for a page

In our CSS tutorial, you can find more details aboutthe details of the font-family property.。


Syntax

<basefont size="number" />

Attribute Values

Value Description
font_family Specifies the font of the text. To specify a priority list of several fonts, separate the font names with commas (e.g., <basefont face="verdana,arial,sans-serif" />).


HTML basefont 标签参考手册HTML <basefont> Tag Other Extensions