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


attribute selector quiz

I am stuck on the question: Add a new attribute selector that will target the input element with the type attribute value 'text'. Set the background color to 'lightyellow'.

here's what I have done:

input [type="text"] {
background-color: lightyellow;

it says: Bummer! Please check your attribute selector, make sure background-color is set to 'lightyellow'.

7 Answers

Chase Lee
Chase Lee
29,275 Points

Aaron Goldman take out the space between the t and [ right here:

input [type="text"]

It should look like this:


Thanks Chase. That did the trick... hard to believe that one little "space" was tripping me up. now I know!


James Barnett
James Barnett
39,199 Points

@aaron goldman - Remember that spaces are syntactically significant in CSS selectors because spaces in a CSS selector means a descendant selector.

very good to know

worked for me!!!

Kevin Brunt
Kevin Brunt
1,763 Points

Thanks a lot. That space got me too. Great answer thanks everyone.

Thank you!!

I input the answer that way but still not working. had to relaunch the window several times...

Igor Prymak
Igor Prymak
13,590 Points

I had same problem because I tried to write it in one line: input[type="text"] {background-color: lightyellow} You should split it into 3 lines, then it'll work.