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

CSS Question: How do I set the color of paragraphs to black using a hexadecimal value.

This is one of the quiz questions that I cannot find a way to properly write.

6 Answers

Hi Tim, hexadecimal colors start with # at the beginning. The shorthand value for black is 000.

So to select paragraphs, you want to use the p selector, and of course the css color property.

p {
    color: #000;
}
Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Tim:

Welcome to Treehouse!

Have you tried

p {
    color: #000000;
}

Post back with questions.

Ken

Ken Alger
Ken Alger
Treehouse Teacher

Tim;

Dustin shows the shorthand of black (#000) below. Either is valid.

Ken

Thanks much! I was trying to make this complicated when it was simple.

#000 means 0 for Red, 0 for Green and 0 for Blue, black is not a colour, it's an absence of colour :)

p{ color:#000 }

Sean Lopez
Sean Lopez
6,783 Points

Got it. Thanks