You can group multiple selectors together in a single rule by providing a comma after each selector; this is illustrated in Figure 2-5. The result is that a rule applies to more than one selector at a time.
Fire up your favorite browser and load the file. Figure 2-6 shows how CSS selects the different headings in the body of the HTML document to apply style.
How It Works
In Figure 2-6 you see the hierarchy of a style sheet, drilling down from the whole style sheet to the value of a property. In Example 2-1, you included a single CSS rule with a selector that provides properties for all six HTML heading elements,
No comments:
Post a Comment