Share this Page URL

Chapter 15. Sheet Music: Styles for Font... > Using Styles to Control Fonts - Pg. 168

Sheet Music: Styles for Fonts, Colors, and Backgrounds 168 · monospace--Displays text in a monospace font (such as Courier New), which means each character--from the wide "w" to the skinny "i"--is given the same amount of horizontal space. This is similar to the effect produced by the <TT> tag. · serif--Displays text in a serif font (such as Times New Roman), which means each character has extra cross strokes (called feet in the typographic biz). · sans-serif--Displays text in a sans serif font (such as Arial), which means each character doesn't have the extra cross strokes. (Although this is a two-word value, it doesn't require quo- tation marks because it's a built-in value.) Page Pitfalls All of the version 4 and later browsers will render the monospace, serif, and sans serif families reliably. However, support for the cursive and fantasy families is spotty, so you should probably avoid them. These are most often used at the end of a list of font families as a "catch all" value that will render the text the way you want if the user doesn't have any of the specific font families installed. For example, if you want to display sans serif text, you might set up your style like this: .title {font-family: Arial, Helvetica, "MS Sans Serif", sans serif} The following HTML file (it's ssfamily.htm on the CD in this book) puts a few families to the test.