Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.