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

zoe chen
zoe chen
501 Points

set the color of paragraphs to black using a hexadecimal value.

how can i finished this question, please teach me `

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

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

#logo {
  text-align: center;
  margin: 0;
}
header{
  background:#6ab47b;
  border-color: #599a68;
}
h1,h2{
  color:#fff;
}

Hi, This is the answer to all 4 questions.

h1{
  color:#fff;
}

h2{
    color:#fff;
}

p {
  color:#000000
}

nav a {
  color:#fff;
}

nav a:hover {
  color:#32673f;
}

Let me know if this helps

Cheers

1 Answer

Hi Zoe,

The hexidecimal value of black is #000000.

So you would type:

p { 
color: #000;
}

In a hex value, the first 2 digits are for red, the next two for green and the last two for blue. You can create pretty much every color with this combination. 0 is the lowest value and F is the highest value. 0=0 1 =1 2=2 3-3 4=4 5=5 6=6 7=7 8=8 9=9 A=10 B=11 C=12 D=13 E=14 F=15

So, color #FF0000 would be all red. #00FF00 would be all green and so on. #FFFFFF would be white and then, of course, #000000 is all black.

In css, when you have a hex that has all the same values, like #000000, you can shorthand it to #000.

Elian