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 How to Make a Website Customizing Colors and Fonts Write Hexadecimal Colors

How do you set the color of pagaraph element in the hecidecimal format. Can you please write out the code?

Thank you so much community I would like to see the code. I am just not seeing how to code this.

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;
} </p>

2 Answers

Erik McClintock
Erik McClintock
45,783 Points

Jon,

You're close, but you have two simple errors here! To fix them both, you simply need to write your code in the same fashion as everything else in the document.

You have:

<p>  {
  color#000;
} </p>

You need:

p {
  color: #000;
}

To target your paragraphs in CSS, you simply write the selector (or a class, ID, etc.), which for paragraph is just 'p'. The angled brackets create the tag, which is HTML, not CSS. The other error you had was the missing colon after the property declaration.

Erik

Eric, First of all, thank you so much. However your answer is not working for this particular test question. to me its seems like there is a problem with the selector.

here is actual question:/Users/jonphelps-steele/Desktop/Screen Shot 2015-01-19 at 4.52.54 PM.png

Erik McClintock
Erik McClintock
45,783 Points

Jon,

That screenshot won't appear here, so I cannot use that to determine where in the challenge you are getting stuck.

What task number are you stuck on (out of the 4 tasks in this challenge)? Is it challenge task 2, regarding turning all the paragraphs black using a hexadecimal value? If so, the 100% guaranteed correct way to do that is how I mentioned before:

p {
    color: #000;
}

What error are you getting when you try to submit that? And can you copy/paste your entire code block again (like you did initially) so that I can see if you might've accidentally caused an error elsewhere?

To clarify, as well: you need to still leave all the previous code in the editor when you submit that new paragraph declaration...if you're trying to submit ONLY the paragraph code, then yes, it will throw an error. You need to leave all previous code in the editor every time you make a new submission, unless the challenge specifically directs you otherwise.

Erik