Inherit Styles from the Body Element

Tell us what’s happening:

Your code so far

  body {
    background-color: black;
  .green {
<h1 color="green">hello world</h1>

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.113 Safari/537.36.

Link to the challenge:

In this challange main thing is “inherit styles”.
Inheritance means in this case - body is parent of h1 and h1 can take styles like color, background, font-size, font-family. Check more info here
Other words if you define
body {
color: red;
will take color: red; automatically.
But if you define
then body will not accept style rule background-color: green;.It will be defaul #fff

So lets take a look at your code. We need make h1 color: green but not define inline style like h1 color=“green” .
So we can define
font-family: Monospace;
color: green;}
for body. Then h1 will take style font-family:Monospace;. and color: green;

Feel free to ask a questions.
Best rigards.

Thank you for explaining the formula, it was extremely helpful.It cleared up a lot for me. :smile: