Stuck on Override Class Declarations with Inline Styles

Stuck on Override Class Declarations with Inline Styles
0

#1

It says that the “Give your h1 element the inline style of color: white.” is checked, however the “Your h1 element should be white.” isnt. How so? if so what should i do?

Code:

<style>
  <h1 style="color: green"
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  #orange-text {
    color: orange;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
</style>
<h1 id="orange-text" class="pink-text blue-text">Hello World!</h1>

#2

Hello not-reko.

Your task is to give h1 element the inline style of color white. In your example it’s green. All you have to do is swap it with white. Your code should look like this:

<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  #orange-text {
    color: orange;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
</style>
<h1 id="orange-text" class="pink-text blue-text"
    style="color: white">Hello World!</.h1>

Remember to remove dots in front of opening and closing h1’s when you input the code.

Happy coding, Nicolas.


#3

I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#4

Thanks Kev.

Pretty neat feature you thought me. I’m new to Freecodecamp and coding, but saw an easy problem and wanted to help.