Prioritize One Style Over Another not working

Tell us what’s happening:
Im pretty sure i have completed the task correctly,but it dosn’t seem to be accepting the change and the colour of the h1 element wont change, from green to pink as stated in the task. because of this, it wont allow me to complete the task and move on to the next one.

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) 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/prioritize-one-style-over-another

Try to declare your css rule outside of the body rule, it should work^^

thank you i didn’t notice the bracket

1 Like