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 to add color black to paragragh in css

how to add color black to paragragh in css

i have written p { color: #0000; }

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: #00000;
}

thanks markown

3 Answers

Mikkel Rasmussen
Mikkel Rasmussen
31,772 Points

You just need to add two more zeros :)

p {
color: #000000;
}

how to add hover state to navigation link to change to color

For hex colors the length should be either 3 or 6, so

color: #000;

or

color: #000000;

would work.

If you want to change the color of a link you're hovering over you want to create a new CSS rule. Instead of using "a" as the selector, you'll want to use a:hover. You can then add whatever property and value you want to that. So, it would look like this...

a:hover { color: #000; }

When you add semicolon and a state such as hover to a selector, you are using a pseudo-class. There are several and it's worth looking up more information about them.