By using the <font> tag, the style, size, and color of the text of the web site is added. You can customize the font by using the size, color and face attributes. By using <basefont> tags, all the text of the page can be set in the same style, size, and color.

Without using <font> and <basefont> tags, CSS should be used (discussed in the CSS tutorial).

Font size

Size is the size of the font defined by the size attribute. The size of the font’s size is 1 (the smallest) to 7 (the biggest). The default font size is 3.

 

<p>
<font size="5">Here is a size 5 font</font>
</p>

Display:

Here is a size 5 font

Font color

Font color is set with the help of the color attribute.

<font color="#990000">This text is hexcolor #990000</font>
<br />
<font color="red">This text is red</font>

Display
This text is hexcolor #990000

This text is red

Font face

The font face should be careful because you do not see the font set in your system, and instead you can see the Times New Roman font by default.

<p>
<font face="Bookman Old Style, Book Antiqua, Garamond">This paragraph
has had its font...</font>
</p>

Display

This paragraph has had its font…

Basefont

With the help of the Basefont tag, you can set the default font for web pages. The correct path to use basefont is shown below.

<html>
<body>
<basefont size="2" color="green">
<p>This paragraph has had its font...</p>
<p>This paragraph has had its font...</p>
<p>This paragraph has had its font...</p>
</basefont>
</body>
</html>

Display

This paragraph has had its font…

This paragraph has had its font…

This paragraph has had its font…

 

Lastly, use CSS (discussed in the CSS tutorial) without using font or basefont.

Attributes: Review

Attribute= “Value” Description
size= “Num. Value 1-7” Size of your text, 7 is biggest
color= “rgb,name,or hexidecimal” Change font color
face= “name of font” Change the font type

Beautiful style of the first character:

Fonts can be customized by customizing the font.

<p><font size="7" face="Georgia, Arial" color="maroon">C</font>ustomize
your font to achieve a desired look.</p>

Display

Customize your font to achieve a desired look.