Share this Page URL

Part: 3 High HTML Style: Working with St... > Sheet Music: Styles for Fonts, Color... - Pg. 165

165 Chapter 15. Sheet Music: Styles for Fonts, Colors, and Backgrounds In This Chapter · Fiddling with font sizes, families, and weights · Indenting and aligning text · Text formatting such as underlining and strikethrough · Working with style sheet colors · Getting a handle on background styles · Lots of ways to use styles to gussy up your pages. Okay, now that you know how to sew styles into your HTML creations, it's time to examine the specifics of the various styles available. This chapter examines style definitions for fonts, text, colors, and backgrounds. Using Styles to Control Fonts Earlier in the book (Chapter 3, "From Buck-Naked to Beautiful: Dressing Up Your Page," to be exact) I showed you how to use the <FONT> tag to adjust font properties such as the size and typeface. Well, anything the <FONT> tag can do, style sheets can do better. The next few sections show you why. Font Size Styles The <FONT> tag's control over the size of the font is limited, at best. Style sheets are vastly superior because they enable you to set the size of your text to just about anything you want. Just so you know, the font size is a measure of the relative height used for each character. Although style sheets give you several ways to specify these heights, it's probably best to stick with points. To set the size, use the font-size style and set it to a number that ends with pt, like so: P {font-size: 14pt}