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

Additional Pseudoclasses challenge 2 of 2

Could someone explain what this question is asking? " Create a new rule using the selector that targets an element only if its ID matches the hash in a URL. Set the background color to 'tomato'."

I am especially confused about the "only if it matches the hash in a URL" What does this mean?

1 Answer

Like the first part of this challenge (selecting root), there is a unique selector that can be used.

The question is asking: "Select the HTML element that has an ID which is identical to the hash in the URL". For instance: if the URL is http://teamtreehouse.com/user#edit, you're looking to style the HTML element of #edit.