'Your h1 element should be pink.' I can't seem to get this right, I don't get what I'm doing wrong

Tell us what’s happening:
Describe your issue in detail here.

  **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/99.0.4844.74 Safari/537.36

Challenge: Prioritize One Style Over Another

Link to the challenge:

nvm i actally had to change the color from green to pink lmao

1 Like

So two things here;

Looks like it’s a case of a missing curly brace, which happens to everyone eventually :slight_smile: try this:

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

also, quotes around class names is well formed HTML

<h1 class="pink-text">Hello World!</h1>

having no quotes leaves your browser trying to figure out what you meant. Sometimes browsers get it right, sometimes not.

1 Like