Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

FONTS: SIZE, COLOR, AND FACE

Fonts are essential in making a website more user-friendly and increasing content readability. Font face and
color depend entirely on the computer and browser used to view your page but you can use HTML <font> tag
to add style, size, and color to the text on your website. You can use a <basefont> tag to set all of your text to
the same size, face, and color.
SPECIFYING FONT SIZE
1. Add the <font> tag pair. The <font> tags allow you to control the size of your font.
2. Add the font-size attribute. You can add attributes as follows: <font size=” value”>. The value can be
numbered 1-7. The default size is 3 which will automatically display is you will not specify the size.
[ The tag <br> is an empty tag that is used to insert a line break. It has no end tag in HTML.]
3. Test your page. Save your file and view the result.
[NOTE: The WorldWide Consurtium (W3C) has removed the <font> tag from its recommendations and has
encouraged the use of styles in sheets in CSS to define font styles (size, color, and kind). However, many of the
websites still use this tag.]
SPECIFYING FONT COLOR
Font color provides life and excitement to your words, phrases, and sentences.
Syntax of Font Color: <font color=”color_name/hex_number/rgb_number”>
Attribute Values:
color_name- sets the text color by using the color name. ex: “red”
hex_number: sets the text color by using color hex code. ex: “0000ff”
rgb_number: sets the text color by using rgb code. ex: “rgb(0 , 153, 0)”
[NOTE: The <font> color attribute is not supported by HTML5.]
1. Add the <font> tag pair. Font <font> tags also allow you to control the color of the font.
2. Add the font color attribute. You can add <font color=” value”>. The value can be a color name, hex number,
or rgb number. The default color is black and it will automatically apply if you will not specify.
3. Test your page. Save your file and view the result.
SPECIFYING TEXT FONT
The font tag can also specify the text fonts that can be used in the website. The text font is also known as the
face in the HTML. The fonts usually available in Windows computers are Time Roman and Arial, and for the
Macintosh computers they usually use Time and Helvetica. It is advisable to stick to these fonts in HTML but it
should not prevent you from using other fonts if need be.
You can set font face using attribute but be aware that if the user viewing the page doesn’t have the font
installed, they will not be able to see it. Instead they will see the default font applicable to the user’s computer.
Syntax of Text Font: <font face=”value”
1. Add the <font> tag pair. The <font> tags can also allow you to specify the text font.
2. Add the font face attribute. You can also add attribute as follows: <font face=”value”>. The value are
specified as the font you want to use such as Times Roman and Arial.
3. Test the page. Save your file and view the result.
[A visitor will only be able to see your font if they have the font installed on their computer.
So it is possible to specify two or more font face alternatives by listing the font face names, separated by a
comma.]
FACE ATTRIBUTE
The fonts can have different attribute, they may be bold, italic, and more, you can set them in HTML as well.

COMMONLY USED FACE ATTRIBUTE


TAG FUNCTION
<b></b> Boldface
<i></i> Italics
<u></u> Underline
<strike></strike> Strikethrough
<sup></sup> Superscript

<sub></sub> Subscript
<em></em> Emphasis
<strong></strong> Strength
<big></big> Increase size
<small></small> Decrease size

You might also like