HTML Basefont Tag

The <basefont> tag sets a default font style for the entire webpage. Once you define it, the font face, size, and color you choose will apply to all the text that follows — unless it's overridden by another tag like <font> or a CSS style.

Syntax -
<basefont face="Arial" size="4" color="blue">
AttributeDescription
colorSets the font color (name or hex code like #ff0000)
faceSets the font type (e.g., Arial, Verdana)
sizeSets the font size (from 1 to 7). The range of accepted values is from 1(smallest) to 7(largest). The default size of a font is 3.
Example -

Scenario - Example Using <basefont> Tag

<!DOCTYPE html>
<html>
	<head>
		<title>Basefont tag example.. </title>
	</head>
	<body>
		<basefont face="verdana" color="green" size="1">Font 
			example output display with color green and of size=1</basefont> 
		
		<p> basefont tag is not supported in any browser. 
		Use CSS instead.</p>
</body>
</html>
Output -
Font example output display with color green and of size=1

Modern Alternative Using CSS -

Scenario - Instead of using <basefont>, here’s how we do the same thing today with CSS:

<!DOCTYPE html>
<html>
	<head>
		<title>Basefont tag example.. </title>
		<style>
		  .example {
			font-family: Arial;
			font-size: 16px;
			color: green;
		  }
		</style>
	</head>
	<body>
		<h4 class="example">This is the modern way to 
			style fonts</h4>
		<p class="example">CSS is now the standard for 
			handling text appearance on web pages.</p>
</body>
</html>
Output -

This is the modern way to style fonts

CSS is now the standard for handling text appearance on web pages.