I need help in solving this

someone kindly assist me in solving this challenge.
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 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36.

Challenge: Prioritize One Style Over Another

Link to the challenge:

Is that really correct?

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

Hi @msarmiento!

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.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

Pre-formatted-text

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
If you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

Hey @msarmiento
Welcome to FCC’s Forum.

Please don’t share the full code.
Try explaining the OP (original poster) about the solution.

2 Likes

this exactly what i have. I keep getting an error message saying the h1 element should be pink.

1 Like

Can you please share your current code @pinini? That will help others assist you

1 Like

@pinini
You didn’t close the style for the h1

<style>
h1 {
   color: pink;
} // here you didn't close.
</style>

Please make a note of it.

And, you have nested .pink-text inside body in the style.

Thanks,
Codely

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

But you have to remember that the class color(.pink-text) will overwrite body color