jump to navigation

Font formatting August 25, 2008

Posted by Nsh15 in HTML.
Tags: , , ,
trackback

The FONT tag allows you to adjust the size,color and face of your text

1. Font size:

A number 1 to 7 for height and thickness. Using a + or a – before the number will adjust the size against the default. Normal text size is 3. The text color usually defaults to black unless there is a different color specified in the BODY tag.

The code format:

<font size = “number value”> text here </font>

or

<font size = “+- number above or below the default text value which is 3″> text here </font>

Example:

<font size=”5″> This text size is 5 </font> <br>

<font size = “+2″> This text size is 5 </font>

The above code gives us the following result for both codes:
This text size is 5

notice that u can use BASEFONT after the BODY tag to establish a BASE or general FONT size. Any individual FONT tags will over-ride the BASEFONT.

Big and small tags:

U can use Big and small tags which hang the relative size of a given word or phrase with respect to the surrounding text.Big and Small are both container elements. That is, all the text that is contained between the opening and closing tags is affected by the tag. it important to notice that big and small are independent tags and they r not included in the font tag

Example:

<Big> Big</big> <Big>

<small> Small</small>

it will look like:
Big

Small

2. Font color:

We can set the font color by using the color hex value

the color code format:

<font color=”# color hex value“> text here </font>

Example:

<font color=”#ff0000“> this is red text </font>

this will give us the following text
this is red text

we can add both the size and color attribute together instead of writing ‘em each in a separate line

<font color= #ff0000 size = “4″> this text is red and its size = 4 </font>

it will looks like :
this text is red and its size = 4


3. Font face:

the face attribute allows you to specify the face of the font

The font face code:

<font face = “face name“> text here </font>

in this table some of the faces with their names:

Face name

Code

arial

<FONT FACE=”arial”>This is arial font</FONT>

algerian

<FONT FACE=”algerian”>This is algerian font</FONT>

braggadocio

<FONT FACE=”braggadocio”>This is braggadocio font</FONT>

courier

<FONT FACE=”courier”>This is courier font</FONT>

desdemona

<FONT FACE=”desdemona”>This is desdemona font</FONT>

garamond

<FONT FACE=”garamond”>This is garamond font</FONT>

modern

<FONT FACE=”modern”>This is modern font</FONT>

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.