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, ...

Get HTML5 and CSS3 All-in-One For Dummies, 3rd Edition now with O’Reilly online learning.

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