Please tell what is wrong with this code?

Tell us what’s happening:

Your code so far


<h1>Hello world</h1>
<style>
body {
  background-color: black;
  color:green ;
  font-family:monospace;
}

</style>

Your browser information:

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

Challenge: Inherit Styles from the Body Element

Link to the challenge:

What is the expected output?
https://jsfiddle.net/yzs3c075/1/

Hey there, your code is 100% correct. I passed it with exactly the same code. Maybe it’s a browser thing(?)

1 Like

These:
You should create an h1 element.

Your h1 element should have the text Hello World .

Your h1 element should have a closing tag.

Your body element should have the color property of green .

Your body element should have the font-family property of monospace .

Your h1 element should inherit the font monospace from your body element.

Your h1 element should inherit the color green from your body element.

I still believe it is browser problem. You should try these things and see how it goes, got it from buddy in previous discussion:

  1. Turn off extensions
  2. Incognito mode
  3. Different browser

Good luck! :slightly_smiling_face:

1 Like

If you have a dark mode extension installed you may have to disable it.

1 Like