From the course: CSS: Selectors

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Basic link states: :link, :visited, :hover, :active

Basic link states: :link, :visited, :hover, :active - CSS Tutorial

From the course: CSS: Selectors

Basic link states: :link, :visited, :hover, :active

- [Instructor] This next chapter focuses on pseudo-classes that affect links on the page. We'll start with four pseudo-classes you've probably encountered already, but you may not know in-depth. Here we have a series of links on the page. The way most people style the links on their page these days is as follows. We'll have two styles to do this. One is simply the A, in other words, all of the states of the link are going to be green and bold, with the exception of hover, which comes after this, and this will have a text decoration of none. In other words, all links are going to be green and bold, but when we hover over them, the link underline will disappear. That's really quick and convenient, for sure. However, what if you're building a page with lots of links? How does a user keep track of which links they've visited and which they haven't? Well, it is possible to style all link states individually. This used to be way more common in the web's past, but it's still possible to do…

Contents