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 Foundations Selectors Basic Attribute Selectors

Tommy Gebru
Tommy Gebru
30,164 Points

Selectors stage 2 , of Deep Dive CSS

This is my line of code, please help me fix. The Editor says that my color is not set to darkred.

a [title="More!"] {color:darkred}

4 Answers

Jacob Miller
Jacob Miller
12,466 Points

Two reasons your code is not working: 1) you have a space between a and [title="More!"] that shouldn't be there, and 2) you don't have a semicolor after your css rule.

But you should also change your code slightly, because they want all anchor elements with a title attribute to be dark red, not just the one with the title of "More!". So instead your code should look like this:

a[title] {
    color: darkred;
}
Stone Preston
Stone Preston
42,016 Points

the challenge says to select a elements with a title attribute. You are selecting a elements with a title attribute equal to "More!". All you need to do is select a elements with ANY title (so in otherwords you dont need the ="More!")

Tommy Gebru
Tommy Gebru
30,164 Points

Tried many versions but failed I will try again but I doubt it will workThis is my line of code, please help me fix.

a [title] {color:darkred}
Tommy Gebru
Tommy Gebru
30,164 Points

Yep the message is the same it says please check attribute selector and make sure the color is set to darkred.

a [title] {color:darkred}