O'Reilly logo

HTML5 and CSS3 All-in-One For Dummies, 3rd Edition by Andy Harris

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 3

Selectors: Coding with Class and Style

In This Chapter

arrow Modifying specific named elements

arrow Adding and modifying emphasis and strong emphasis

arrow Creating classes

arrow Introducing span and div

arrow Using pseudo-classes and the link tag

arrow Selecting specific contexts

arrow Defining multiple styles

You know how to use CSS to change all the instances of a particular tag, but what if you want to be more selective? For example, you might want to change the background color of only one paragraph, or you might want to define some special new type of paragraph. Maybe you want to specify a different paragraph color for part of your page, or you want visited links to appear differently from unselected links. The part of the CSS style that indicates what element you want to style is a selector. In this chapter, ...

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