Web Design

(Nancy Kaufman) #1

128


2 Within the style sheet, type
a list of elements to which
you want to apply a style.
Separate the elements with
commas.


3 Press.


4 Type {.


1 In your editor, open a page
that contains an embedded
style sheet.


Style Multiple Elements


O


ften, designers need to apply an identical set of style properties to more than one element. For
example, you may want all of your headings to use the same font family, share the same color,

and have the same border applied. Using a single combined CSS selector, you can set all of these


properties together, saving you initial development time as well as maintenance time in the future


because you can alter the appearance of all of the elements by changing a single rule. Combined


selectors are created by simply having a comma-separated list of elements as the selector.


Style Multiple Elements


1


2


4

Free download pdf