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 can I set the color of paragraphs to black using a hexadecimal value?

I code like this:

a{ color:#000; }

to change the color of paragraph to black but it can't work, so Can you tell me how I can fix it?

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

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

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

a{
  color:#000000;
}

header{
  background:#6ab47b;
  border-color:#599a68;
}

h1,h2{
  color:#fff;
}

nav{
  background:#000000;
}

nav a{
  color:#000000;
}
jason chan
jason chan
31,009 Points
p{ color:#000; }

paragraph is p

please refer to documention on paragraph css.

http://www.w3schools.com/css/tryit.asp?filename=trycss_text-indent

Oh thanks very much :)

2 Answers

You want

p { color: black }

a stands for anchor (links)

Warren Leyes
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Warren Leyes
Front End Web Development Techdegree Graduate 31,808 Points

the question would be what are you trying to do? since I see you have multiple anchor declarations including text decoration, makes me wonder if you are actually trying to override the link colors? if so then you need to target using :link, :hover :visited and :active pseudo classes.