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

Gina Bégin
Gina Bégin
Courses Plus Student 8,613 Points

RE: 1st Challenge Task for the CSS "Selectors" tutorial

In the Challenge Task for the CSS "Selectors" tutorial, we are asked to "Create an attribute selector that will target <a> elements with a title attribute. Add a color property with the value darkred."

I tried

a [title] {
  color: darkred;
a [class="title"] {
  color: darkred;

and finally:

a [class=title] {
  color: darkred;

None of these worked (probably obviously...but I can't see what I'm missing!). What's the solution?

Thank you!

3 Answers

Hi Gina,

Your 1st one is what you want except you need to remove the space in the selector a[title]

With a space between the two you're creating a descendant selector.

Try without the space after the anchor element.

You're welcome