Share this Page URL

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

From Buck-Naked to Beautiful: Dressing Up Your Page <BASEFONT="6"> This text is displayed in the base font size. However <FONT SIZE="-2">these three words</FONT> were displayed in a font size that's two sizes smaller than the base font. 36 The <FONT SIZE="-2"> tag tells the browser to display the text in a font size that's two sizes smaller than the base font (to get larger fonts, you'd use a plus sign (+), instead). Therefore, because I specified a base font of 6, the text between the <FONT> and </FONT> tags appears with a font size of 4. Why not simply use <FONT SIZE="4">, instead? Well, suppose you plaster your document with dozens of font changes and then, when you display it in the browser, the fonts appear too small. If you're using explicit font sizes, you have to painstakingly adjust each <FONT> tag. However, if you're using relative font sizes, you only have to change the single <BASEFONT> tag. The <FONT> Tag, Part II: Changing the Typeface By default, the browser uses a plain typeface to render your pages. However, you can change that by shoehorning the FACE attribute into the <FONT> tag, like so: <FONT FACE="typeface"> Here, typeface is the name of the typeface you want to use. The following page (it's typeface.htm on this book's CD) shows a few FACE-enhanced <FONT> tags in action, and Figure 3.6 shows what Internet Explorer 6 thinks of the whole thing. <HTML> <HEAD> <TITLE>Changing the Typeface</TITLE>