129
CHAPTER
Advanced CSS 5
TIPS
What if I want only some of the styles to apply
to all of the elements?
You can use combined style declarations to apply
styles to multiple elements, and then include
separate rules to apply different styles to individual
elements. For example, you could create a combined
style similar to that shown in this section to set all
of your headings to the same font and color, and
then add individual style declarations for each
heading level in which you set different font sizes.
Does the order in which I list the elements in a
combined rule matter?
No. You can list them in any order. However, if you
have both the combined selector and individual
selectors for elements, and the individual selectors
contain rules that contradict those in the combined
selector, the rule that you want to apply must
appear last in your style sheet.
● When you view your page
in a Web browser, all of the
specified elements share the
same styles.
5 Type one or more style rules.
6 Type }.