9. Defining Selectors

As you saw in “Constructing a Style Rule” in Chapter 7, there are two principal parts of a CSS style rule. The selector determines which elements the formatting will be applied to, and the declarations define just what formatting will be applied. In this chapter, you’ll learn how to define CSS selectors.

Whereas the simplest selectors let you format all the elements ...

Get HTML and CSS: Visual QuickStart Guide, Eighth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.