Creating Style Rules

We've seen how to create selectors in rules; it's time to take a look at creating rules themselves . A rule is composed of a selector followed by a semicolon-separated list of property-value pairs enclosed in curly braces, like this:

 TITLE {display: block; font-size: 24pt; font-weight: bold;  text-align: center; text-decoration: underline} 

In this case, I'm setting values for the display , font-size , font-weight , text-align , and text-decoration properties. You assign a value to a property by following the name of the property with a colon , whitespace, and the value you want to assign.

Quite a number of properties are defined in CSS. The best way to get a grip on what's going on is to actually use them, so we're about to see a lot of examples.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net