I am done but not able to understand

Tell us what’s happening:

Your code so far


<style>

  body {
    background-color: black;
    color:green;
font-family:monospace;
  }

<h1>Hello world</h1>

</style>

Your browser information:

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

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

What you did: you added some CSS to the ‘body’ of the hmtl page…

What they want you to learn: styles can be inherited from ‘parent’ elements… this is the intention of this exercise

Some things about the set-up that help facilitate the learning: note that the only thing with typing/words is inside the h1 tags… which is a ‘child’ of the body (it is nested within the body). So you can ‘test’ if styles are inherited by changing stuff in the body and see if it ‘cascades’ down into the h1 element.

What happened: Your CSS changed the words inside the h1 tags… to green, and to a font style called Monospace that is well… very evenly spaced, almost like typewriter ‘font’…

1 Like

your <h1></h1> should be outside style tags

2 Likes

thanks a lot, i was like thinking that some where i was doing mistake. thank you you helping me.

1 Like