O'Reilly logo

The Book of CSS3 by Peter Gasston

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 4. Pseudo-classes and Pseudo-elements

image with no caption

The very first CSS specification, CSS1, introduced the concepts of pseudo-classes and pseudo-elements. These are selectors that act upon information about elements that extends (or sits outside of) the document tree, such as the state of a link or the first letter of a text node. A pseudo-class differentiates among an element’s different states or types; these include—but are not limited to—those that provide information about link states: :hover, :visited, :active, and so on. A pseudo-element provides access to an element’s subpart, which includes those pseudo-elements that select portions of text nodes, ...

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