Prioritize One Style Over Another - Help

Tell us what’s happening:
I don’t understand what I’ve done wrong. The text is pink but I’m told I haven’t set a CSS class nor assigned the class to the HTML element properly.

Thank you.

Your code so far


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

  .pink-test {
    color: pink;
  }
  
</style>

<h1 class="pink-test">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/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/prioritize-one-style-over-another

just a typo problem
you wrote:
pink-test
but they wanted
pink-text

(change both places)

2 Likes

ugh. so dumb. thank you very much! as an aside, this would work in reality but it doesn’t conform strictly to the test so it didn’t pass?

yes you guessed correctly. In the real browser environment, your code is perfectly fine.

1 Like

Thanks, hbar1st, for taking the time to help me!

1 Like