A style over another style

Tell us what’s happening:
Hi All,
i have tried everything i can. however, seems below code doesnt work.
could someone help me?
regards,

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

Challenge: Prioritize One Style Over Another

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

Welcome @a14guguliye !!
You mispelled word ‘pink-text’ with pink-test,it is supposed to be pink-text.
Also,you have to add semicolon at the end
color:pink;
Hope this helps :smile:

No it didnt unfortunately

<style>

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


</style>


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

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

1 Like

this is not valid syntax, the ; must go at the end of a css rule not after the closing curly bracket

1 Like