Why is text pink if i apply blue

Tell us what’s happening:
why is text pink if i apply blue?

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36.

Challenge: Override Styles in Subsequent CSS

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/basic-css/override-styles-in-subsequent-css

With the above code, the text is blue, but you did not follow the instructions:

Apply the blue-text class to your h1 element in addition to your pink-text class, and let’s see which one wins.

1 Like

Hi Harshlebrown,

There is an extra space (not needed) before closing your class tag of h1. Don’t forget to add the pink-text class too, as mentioned above.

1 Like