09/19/2017
HTML - Font & basefont
admin admin

HTML - Font & basefont

The tag is used for modifying the type of a text, the size and the color. Use "size", "color" and "face" attributes to personalize your text and the tag to set the color, size and the style of a whole text.

Mostly the "font" and "basefont" tags are not used much, because CSS offers a much better way to set text's attributes.

The font size

Set the size of your font. There are accepted values between 1 (the smallest) and 7(the biggest). The standard value of a text is 3.

HTML<p><font size="5">This is font size 5font>p>

Demo

This is font size 5

The font color

Set the color of the text

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

Demo

This text is hexcolor #990000
This text is red

Font face

Pick a letter style using the font's face attribute. You can choose any font you have installed, but choose the font with care, because the user on your page can't see the font if he hasn't got installed your font. He will see the default font meaning Times New Roman. The solution would be to choose many fonts who look the same.

HTML<p><font face="Bookman Old Style, Book Antiqua, Garamond">This paragraph has had its font formatted  with the font's face atributefont><p>

Demo

This paragraph has had its font formatted with the font's face atribute

Basefont

With the help of the "basefont" tag you can set the default value of the font in your web page. We recommend to specify a "basefont" in case you will use the font in HTML. Here you have an example.

HTML<html> 
	......
	<body>
		<basefont size="2" color="green">
		
			<p>This paragraph has had its font formatted with the basefont tagp>
			<p>This paragraph has had its font formatted with the basefont tagp>
			<p>This paragraph has had its font formatted with the basefont tagp>
			
		basefont>
	body>
html>

With all these, "basefont" is somehow deprecated. In the close future is possible that it won't work with anymore and will be entirely replaced by CSS rules.

Attributes

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

The beginning "by the book"

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




LEAVE A COMMENT

Facebook Conversations

FOLLOW US