Need help for this problem

Tell us what’s happening:

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/inherit-styles-from-the-body-element

Hey @raj552,

Do not put h1 tag inside style tag.
Style tag is used to for CSS styles,
similar to what you have done with body element.

See if that helps.

1 Like

but this is not working

The body element should have color property of green.
If you see closely. you will find that you are not doing so.
Try solving that.

give me an example so i can do it

See,
You are giving “background-color” property value of green.
Whereas challenge asks you to do so for “color” property.
There is a difference between “color” and “background-color” properties.
Color is for color of the text whereas background-color is for background.
Does this help?

1 Like