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 trialadam osman
805 PointsHow do I set the color of paragraphs to black using hexadecimals values?
I'm not sure how to do complete this challenge. I don't see where video discussed setting color of paragraphs nor creating black with hexadecimals. I tried the following but it didn't work.
p1, p2 { color: #000; }
3 Answers
Adrian Melendez
5,555 Pointsp1 and p2 aren't valid html elements.
p {
color: #000000;
}
I haven't done that challenge, but the code above changes paragraph elements to black text.
Gary Hurd
17,533 PointsHI Adam, I would just use the following:
p[ color:#000; }
For white and black, you can use the abbreviate hex for those colors. It save a little time typing. White would be #fff and black is #000
g
adam osman
805 Pointsthank you.
Gary Hurd
17,533 PointsIf you had a specific paragraph that you wanted to have a certain color on, you can give that paragraph a class and us that class attribute with to only color that particular paragraph.
adam osman
805 Pointsadam osman
805 Pointsthanks