O'Reilly logo

Sams Teach Yourself CSS in 10 Minutes by Russ Weakley

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 10. Styling Links

In this lesson, you will learn how to style links. You also will learn how to add background images to links, turn off link underlines, use borders for underlines, and increase the active link area.

Links and Pseudo-Classes

You have already learned how to style <a> or link elements in Lesson 3, “Selectors in Action.” Now you will learn how to style the five different link states.

Links can be in the following states:

  • Normal—The standard unvisited link state

  • Visited—The link points to a URI that has already been visited

  • Hover—The cursor is over the active area of the link

  • Active—The moment the link is selected or clicked

  • Focus—The link is in focus and ready to accept input, such as a click or mouse down

Some link states ...

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