HTML Element <basefont> Example

The HTML element <basefont> is used to define the default base font of an HTML document, which applies to the whole document.

A default base font will determine the properties like font size, font color, and font family.

Here is an example that explains the element in action. Click the below link to see the live demo.

Run this on IDE

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Example - HTML Element basefont</title>
    <basefont color="red" size="5" face="arial, sans-serif" />
</head>
<body>
    <h1>Heading Text</h1>
    <p>Some paragraph text goes here.</p>
</body>
</html>

Related Links