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 you set color for paragraphs with CSS?

I have tried adding #para but not sure this is write...

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

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

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

h1, h2{
  color: #fff;
}

#para {
  color: #000;
}

5 Answers

Emma Davis
Emma Davis
4,760 Points

If you want a color applied to all paragraphs, you just use the paragraph tag 'p'. What you are trying to do is apply a colour to the any element with the id of 'para'.

So your css should be

p {
    color: #000;
}
Martijn Schuijers
Martijn Schuijers
9,961 Points

You should use the p element selector:

p {
  color: #000;
}

thank you both, going to need to make more notes I think... :)

As the others have said you can just select all paragraph elements however, if you just want to select a certain paragraph here is the steps. First you were setting that #para to the color black which is default styling unless you changed the background color or have a image.

  1. Make sure you have the <p id="example">BlahBlahBlah</p>
  2. Go to your css stylesheet and select example #example { color: #fff; }
  3. Make sure all your pages are saved. CSS usually will not proceed to apply the styles if your home page is not saved. I hope that gives you a good example on what you were trying to do.

thank you, have saved that note for future

feel bad having to choose a best answer as all helpful...