Share this Page URL

Chapter 14. A Beginner's Guide to Style ... > Three Sheets to the Web: Style Sheet... - Pg. 160

A Beginner's Guide to Style Sheets 160 Webmaster Wisdom Besides applying multiple styles to a single tag, it's also possible to apply a single style to multiple tags. What you do is list the tags you want affected, separated by commas, before the opening brace ({ ). Here's an example: P, OL, UL, DT, DD {font-size: 10pt} As a different example, suppose you want all your <TT> text to appear in a gray font. In style sheet land, font color is governed by the color property, so you'd set this style like so: TT {color: gray} Finally, you can set multiple properties in a single style by separating each property and value with a semicolon (;). In the following example, <H2> tags are displayed with purple, 20-point text: H2 {color: purple; font-size: 20pt}