O'Reilly logo

Sams Teach Yourself CSS 24 in Hours by Kynn Bartlett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Selectors

<feature><title>What You’ll Learn in This Hour:</title>
  • More about simple selectors you’ve already been using

  • How to use class and id selectors

  • What the universal selector is and when to use it

  • What pseudo-classes and pseudo-elements are and how they can be used

  • How to specify styles that affect hypertext links

As you learned in Hour 2, “Getting Started with CSS,” selectors are the part of the CSS rule that identifies the target of the styling. Putting the power of selectors to use is vital for getting the most out of CSS.

</feature>

Simple Selectors

You’ve seen the simplest type of selectors already: type selectors, class selectors, and id selectors. In this hour, you’ll look at how you can use them more effectively.

So far you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required