Another way of creating an element selector in a style rule is to list a number of elements, separated by commas. The same rule will apply to the whole group of elements, as in this case, where I'm styling the <TITLE> and <AUTHOR> elements the same way: Listing ch09_04.cssTITLE, AUTHOR {display: block; font-size: 24pt; font-weight: bold; text-align: center; text-decoration: underline} SECTION {display: block; font-size: 16pt; font-weight: bold; text-align: center; font-style: italic} P {display: block; margin-top: 10} You can see this stylesheet applied to the XML document we've been using in Figure 9-3. As you see in that figure, the <TITLE> and <AUTHOR> elements are indeed styled the same way. Figure 9-3. Using a group selector in a stylesheet.
|