Basefont Tag in HTML

1
125

The <basefont> tag in HTML is used to define the base font size, color, and face for a web page. This tag is used to set the default font size and other properties for all the text on a web page.

Syntax: The syntax for the <basefont> tag is as follows:

<basefont size=”size” color=”color” face=”face”>

Attributes:

The <basefont> tag has the following attributes:

  1. size: This attribute is used to specify the default font size for all the text on the web page. The size value can be a number from 1 to 7, where 1 is the smallest size and 7 is the largest size.
  2. color: This attribute is used to specify the default font color for all the text on the web page. The color value can be specified using a color name, hexadecimal value, or RGB value.
  3. face: This attribute is used to specify the default font face for all the text on the web page. The face value can be any valid font name or font family.
Also Read:  marquee Tag in HTML

Example:

Here is an example of how to use the <basefont> tag to set the default font size, color, and face for a web page:

<!DOCTYPE html>
<html>
<head>
<title>Basefont Tag Example</title>
<basefont size=”4″ color=”#0000FF” face=”Arial”>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>

In this example, the <basefont> tag is used to set the default font size to 4, default font color to blue, and default font face to Arial for all the text on the web page.

Note: The <basefont> tag is deprecated in HTML5 and is no longer supported by most modern browsers. It is recommended to use CSS to set the font size, color, and face for a web page.

Previous articleBase Tag in HTML
Next articleBdi Tag in HTML
Namaskaar, Friends main Kapil byteshastra.com ka Founder hu. Mere kai English blog bhi hai ,par mera motive yahan par easy language mein Technology se related Gyan ko aap tak pahunchane ka hai .taki aap kuch naya shikh sake. meri koshish hai ki bilkul simple tarike se aap ko nyi updates deta rahu taki aap bhi technology ke is yug mein peeche na rahe aur shikte rahe.Mujhse judne ke liye app mujhe Social Media par follow kar sakte hai.

1 COMMENT

Leave a Reply