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

Neo Zheng
Neo Zheng
2,552 Points

Create an attribute selector that will target <a> elements with a title attribute. Add a color property with the value

a [title] {color: darkred}

how comes this is not working

5 Answers

So it should be like this:

a[title] {color: darkred;}
Neo Zheng
Neo Zheng
2,552 Points

Thank you Jenny : )

Neo Zheng
Neo Zheng
2,552 Points

Thank you Jenny : )

Neo Zheng
Neo Zheng
2,552 Points

Thank you Jenny : )

You're welcome!

Hi Baogang,

You need to remove the space after the a.

There shouldn't be any space between the 'a' and the attribute you're selecting in brackets.

Mike Morales
Mike Morales
19,833 Points

You're missing a semicolon.