<basefont> Tag in HTML
The <basefont> tag in HTML was used to specify a default font size, color, and face for the entire document. This tag is deprecated in HTML5 and is no longer recommended for use.
Key Points on <basefont> Tag:
- The
<basefont>
tag was used to define default font settings for the entire document or specific sections of it. - This tag was typically used to set face, color, and size attributes for text.
- The
<basefont>
tag is now deprecated in HTML5, and using CSS is the recommended way to style text.
Syntax of <basefont> Tag:
Syntax Example
<basefont face="Arial" color="red" size="4">
Example of <basefont> Tag in HTML:
This example demonstrates the use of the <basefont>
tag (though it's deprecated in modern HTML).
Code Example
<html>
<head>
<basefont face="Arial" color="red" size="4">
</head>
<body>
<p>This text will appear with the default font face "Arial", color "red", and size 4.</p>
<p>The font settings are applied to the entire document.</p>
</body>
</html>
Output
This text will appear with the default font face "Arial", color "red", and size 4. The font settings are applied to the entire document.
The <basefont>
tag is deprecated in HTML5, and it is recommended to use CSS for styling text, such as using the font-family
, color
, and font-size
properties.