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 Selector 4/10

Add a CSS selector to make the span tag inside the paragraph be underlined.

What should I do on this step?

* {

background-color: white; }

h2[class] { color: blue; }

p { color: white; background-color: black; }

4 Answers

Christer Nordbø
Christer Nordbø
2,133 Points
<selector> <child element> {

Fill in the correct tags and properties to complete the challenge.

Hope this helps!

James Barnett
James Barnett
39,199 Points

@Christer -

Here on the Treehouse forums we usually try to give a hint first and then wait for the asker to respond.

The goal of these forums is not to get people past a code challenge, instead it's to supplement learning so students of Treehouse solve their own issues.

If you take a look at posts from the Treehouse teachers you'll see them give several hints and rarely just give a correct answer to a code challenge.

Christer Nordbø
Christer Nordbø
2,133 Points

Hi James! If you watch basicly every other forum posts posted today you can see that thats the approach that im usually taking.

Sorry about the quick reply on this one.

I edited my answer to try to not give the direct answer to the post.

James Barnett
James Barnett
39,199 Points

@Raymond -

So you've got a span element, which is inside of a p element. How do you write a selector that will select anelement inside of another element?

Remember selectors are evaluated right to left or another way to think of it as, outside in.

If you need a little review you can read about selectors over on the Selectutorial