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 CSS Basics (2014) Basic Selectors Pseudo-Classes

I need help understanding what this is asking. I'm trying to grasp what the code would look like...

Use the pseudo-class selector that targets default, unvisited links. Set their color value to orange.

Is it: :unvisited { color: orange; }

I have tried this and have had no luck.

Hey guys, thanks for the quick responses. I believe i figured it out... brain fart.

2 Answers

Dustin McCaffree
Dustin McCaffree
14,310 Points

If I'm not mistaken, it is ":link". Try that on any class or element that you want to target, for example--

a:link { ... }

Good luck! :)

Dustin

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Jeff. Welcome to Treehouse!

You're kind of on the right track.

First you need to select the <a> tag and then specify that you want the un-visited links using :link. You can read more on this pseudo-class on MDN.

So, your code will look like this:

a:link {
  color: orange;
}

Make sure when you are using pseudo-classes, you do not put a space on either side of the colon. This will cause an error.

If you have any other questions, please let us know. Keep Coding! :)

yeah I have questions

I don't really what going on, task 1 and 2 is confusing, any time I check work on task 2 it says task 1 is no longer passing, I don't no what am doing wrong. pls any help