Share this Page URL

Chapter 3. From Buck-Naked to Beautiful:... > Textras: Fancier Text Formatting - Pg. 37

From Buck-Naked to Beautiful: Dressing Up Your Page 37 Figure 3.6. Use the <FONT> tag's FACE attribute to try different typefaces on for size. Sounds easy, right? Not so fast, bucko. The problem with the FACE attribute is that it works only if the typeface you specify is installed on the user's computer. If it's not, you're out of luck because the browser will just use its default typeface. In the previous example, notice that the browser doesn't render anything for the Whatever typeface because it's not installed. (It doesn't even exist because I just made up the name!) To increase your chances, however, you're allowed to add multiple typeface names to the FACE attribute: <FONT FACE="Arial, Verdana, Helvetica"> If Arial's not installed, the browser will try Verdana, instead; if Verdana's not installed, the browser tries Helvetica; if that's a no go, the default typeface is used. Some Notes About Working with Colors The next couple of sections show you how to change text colors. You'll find that you often have to work with colors when constructing web pages, so it's probably a good idea to take a minute or two now and get the HTML color techniques down pat. Most of the time, you specify a color by entering a six-digit code that takes the following form: #rrggbb This sure looks weird, but there's method in its mathematical madness. Here, rr is the red part of the color, gg is the green part, and bb is the blue part. In other words, each code represents a combination of the three primary colors, and it's this combination that produces the final color. These are called RGB values. The truly nerdish aspect of all this is that each two-digit primary color code uses hexa-decimal numbers. These are base 16 (instead of the usual base 10 in decimal numbers), so they run from 0 through 9, then A through F. Yeah, my head hurts, too. Table 3.4 lists the appropriate values for some common colors.