sound advice, your web design resource logo Home exchange links about us anti-spam pevention our web hosting company
 
search our websitesearch the internet

Tell a friend:

Index: Website Creation

Contains HTML tips, guides to forms, CSS, Java, forms, CGI, image tools, image galleries, website management tools and more!


Resource Guide To - Website Development & Design

Index 4:  All About Text & Style Sheets, CSS

 

Controlling Text With The Font Tag

Early versions of HTML did not have any font control built in,  the guideline was set by the browser in charge of text display.

Netscape, and later Microsoft, created the very nonstandard <FONT> tag, providing explicit control over the size, color, and typeface used to render text on the Web.

Adhering to the pressure, the HTML standards included the <FONT> tag in the HTML 3.2 standard, and broadened its usage even further in HTML 4.0. With the ever so increasing on slot of popular style sheets for managing text appearance, the <FONT> tag has been depreciated in HTML 4.0, meaning that it will probably disappear in a later version. Even so, the <FONT> tag is a handy tool for getting just the right font appearance when you are too lazy to create and use the appropriate style rules.

Controlling font size

While style sheets deal with font sizes in the traditional point sizes (e.g., points, pixels, and em's), the <FONT> tag defines a different size model using values ranging from 1 (very small) to 7 (very large). The default font size is 3.

If you want to change the size of some text in your document, enclose the text in a <FONT> tag with the size attribute set to the desired value. Using: <FONT SIZE="7"> will create big text,
while <FONT SIZE="1"> generates very small text.

You can also make relative size changes. Using SIZE="+1" will enlarge the text to one size greater than the current size; SIZE="-1" makes things one size smaller.

If you want to change the font size for an entire document, you can use the <BASEFONT> tag at the start of your document, setting the SIZE attribute to the desired font size. This is sometimes easier than enclosing the whole document in a <FONT> tag, and works especially well when you only use relative values with the <FONT> tag throughout the remainder of your document.

Controlling font color

The <FONT> tag also accepts the COLOR attribute, whose value may be either a color name or hexadecimal RGB value. The enclosed text is rendered in the desired color. Using <FONT COLOR="magenta"> creates magenta text; <FONT COLOR="#25C0C0"> creates pale blue text.

Word of caution: that inserting colored text in your documents is dangerously  annoying to your users, making your documents unreadable, and generally making a mess of things. Unless you really know what you are doing, or are acting under the advice of someone who does, avoid the use of color unless absolutely necessary.

Changing the type face

By adding the FACE attribute to the <FONT> tag, you can specify a list of fonts the browser should use for the enclosed text. The browser will search for each font in the list, using the first one it finds to render the text. If none of the fonts are available, it uses the default browser font. If you specify <FONT FACE="Arial">, the browser will try to give you Arial text.

It is difficult to design documents that are effective across multiple platforms without worrying about fonts. Adding font selection to the problem really ties documents to specific platforms, alienating broad classes of users.

For example, many HTML authors work on PC platforms and select Windows-specific fonts for their documents. They cannot comprehend that Macintosh and Unix users may not have fonts like Arial and Amazon BT on their systems (although some are available). As a result, their documents look awful, and the end-user suffers.

Specify fonts carefully and with great forethought. If you must use different fonts, consider using style sheets to get the desired effect, where font handling is a bit better defined.

<< BACK


 
© Copyright FinalHost.com -all rights reserved