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

HTML How to Make a Website Customizing Colors and Fonts Write Hexadecimal Colors

How do I "Set the color of paragraphs to black using the p selector and hexadecimal value?" p { color: #000; }

p { color: #000; } isn't working?

css/main.css
a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
}

#logo {
  text-align: center;
  margin: 0;
}


h1, h2 {
color: #fff;

p {
  color: #000;
  }

2 Answers

Steven Parker
Steven Parker
230,235 Points

It looks like the issue is that the previous rule (for the h1 and h2) does not have a closing brace. This makes the paragraph rule appear to be inside the other rule which causes it to be ignored.

Fix that and you should pass the challenge.
And happy coding!

thank you very much

Dave Harker
Dave Harker
Courses Plus Student 15,510 Points

Oh!! I like that 'closer' Steven ... I think I'll use it!

How do you get the newline for the "And happy coding!" without actually having the blank line that is added when spacing it out in the editor; I always find if I add some text on the line immediately following another, it just appends.

Any other commenting tips you've picked up? I'd love to hear them (and learn how to use the forum editor better)

Thanks,

Dave.

Steven Parker
Steven Parker
230,235 Points

Hey Dave,   :point_left: two spaces
You can put two spaces at the end of a line to get an actual newline in the output.

You might enjoy the Markdown Basics course to learn about many of the formatting options for the forum. And there's also the Markdown Website for more information.

Dave Harker
Dave Harker
Courses Plus Student 15,510 Points

Thanks so much!

I will take that Markdown Basics course when I get home! Oh! Thanks for the info on double space to create new line ... that's going to save people reading a lot of spaced out comments from me.

Kind regards,
Dave.

Dave Harker
PLUS
Dave Harker
Courses Plus Student 15,510 Points

Hi Ric,

As Steven pointed out, you've missed a closing brace for the h1,h2 rule above your p rule.

Try something like:

h1, h2 {
  color: #fff;
}

p {
  color: #000;
}

Easy to miss, but practice makes better :)

Dave

Thank you very much