Home HTML HTML basefont Tag with Example

HTML basefont Tag with Example

9
0

The <basefont> tag is used to specify a default font color, size or font family for all text in a web page. This basefont is applied to complete document or web page.

Note: <basefont> tag is deprecated from HTML. Alternate way is to use CSS instead.

Sample Code

<html>
<head>
<title>HTML basefont Tag with Example</title>
<basefont color="green" size="4" />
</head>
<body>
<p>basefont tag is deprecated from HTML. Alternate way to use CSS instead.</p>
</body>
</html>

Sample Result

basefont tag is deprecated from HTML. Alternate way to use CSS instead.

Tip: You can see the complete List of HTML Elements here.

Tag Specific Attributes Support

Following are few basefont tag attributes that are supported by <basefont> tag.

Attribute Value Description
color #xxxxxx
color_name
Represents the default font color for the text
face font_family or font_name Represents the default font family or name for the text
size number –
0 to 7
Represents the default font size for the text

Standard Attributes Support

HTML <basefont> tag supports HTML Attributes. You can get more details about available HTML Attributes here.

Event Attributes Support

HTML <basefont> tag does not support Event Attributes. But you can get more details about available HTML Event Attributes here.

Previous articleHTML base Tag with Example
Next articleHTML bdi Tag with Example
Hi there, I am Mayank, the man behind Technical Mack. I started AspnetO with a motive to educate people on various programming languages ranging from beginners to expert level. Through this blog, I aim to provide more insightful content.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

20 − thirteen =