Use Hex Code for Specific Colors

Tell us what’s happening:

Your code so far

<style>
  body {background-color: black;
    color: #000000; }
</style>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36.

Link to the challenge:
https://www.freecodecamp.org/challenges/use-hex-code-for-specific-colors

Instead of adding the hex code on a separate line, try erasing the word “black” and replace it with the hex code:

<style>
  body {
    background-color: #000000;
  }
</style>

I hope this helps. :slight_smile:

1 Like
<style>
    body {background-color: black;
    color: #000000; }
</style>

“color” is a different style property (it sets text color), so while meaning to use the hex value for black(#000000) to set the background color instead of the color name, you’ve accidentally got black text on black background!
That makes it very hard to read!!

1 Like

Use #000, the short version of #000000.