HTML <basefont> (Base Font) Tag

❮ Previous Reference Next ❯

Deprecated: HTML5 Not Supported

Example

<head>
	<basefont color="red" size="5" face="arial, sans-serif">
</head>

Meaning

It specifies default font size for a document. Font size then can be varied relative to the base font size by using the font element.

Note: Use CSS instead of <basefont> tag which is deprecated in HTML5

Version: HTML 2, 3.2, 4, 4.01


Standard Syntax

<basefont color="color" size="no" face="font">



Browser Support




Status







Attributes

Attribute Value Description
color color Specifies the default color for text in a document.
face font-family Specifies the default font face for text in a document.
size number Specifies the default size of the font in a document.



Use CSS

Example

<!DOCTYPE html>
<html>
<head>
<style>
body {
	color: red;
	font-family: courier, serif;
	font-size: 50px;
}
</style>
</head>
<body>
	<h1>Heading</h1>
	<p>Paragraph.</p>
</body>
</html>
❮ Previous Reference Next ❯