Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS How to Make a Website Customizing Colors and Fonts Use Color in CSS

Link Question

I have a question

To do that, we're going to create another selector in this same rule using a coma and we're going to select the anchor elements again. Now what we want to do here is add what's called a pseudo class to our second anchor element, or our second selector here. It's not a real class in our html but it's basically a state that the element can be put into under the right conditions. So let's go ahead and add a pseudo class. I'm going to type a colon here, and then I'm going to type the word, visited. So this is the visited pseudo class. I'm going to save that out. And if we go to our preview, and refresh the page. You can see that all of these links are white. And even if I click here and go back. They still remain white, even if they've been visited.

That is from a lesson by Nick Pettit in How to build A Website. I couldn't understand why he needed to use a pseudo class in order to keep the anchor elements white after someone has clicked on the link. I tried this out without the second anchor selector with the pseudo-class to check if it stays white after someone clicks on it. And it did. So I don't understand why he did this.

1 Answer

Go ahead and ask