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

Task-1 [title] { color : darkred } as correct answer. Should be a [title] { color : darkred }

The wording of the question is confusing.

7 Answers

Calvin Nix
Calvin Nix
43,828 Points

You don't need to include the [title]. You also need a semicolon after darkred.

a { 

color:darkred;

 }
Calvin Nix
Calvin Nix
43,828 Points

Hey,

So I'm a little confused about what you are asking about. Could you please clarify?

Thanks, Calvin

I want to make sure the question and the answer matches. I got the answer correct on my 3rd attempt but it was a guess to remove the "a".

Calvin Nix
Calvin Nix
43,828 Points

Could you please post the code that you entered initially?

This the code I first posted but it was marked incorrect.

a [title] { color : darkred }

Hi Ms. Ogunka,

The only problem that you have is that you put a space between a and [title]

This creates a descendant selector. It would be looking for an element with a title attribute within the a element.

Remove the space and then it will try to match only links that have a title attribute which is what you want.

a[title]

In this particular case it doesn't matter if you end your declaration with a semi-colon but you should get in the habit of always doing it.

color: darkred;

Thanks, I get it.