Fault in a challenge

Stuck on the challenge "Prioritize One Style Over Another"
Here is my code which is not accepted and is blocking me from moving on to the next challenge.
I tested it elsewhere on online editors and it works. It actually shows the correct result in the
emulator

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

Your h1 element should have the class pink-text. (marked wrong)
Your should have a pink-text CSS class with its color set to pink. (marked wrong)
Your h1 element should be pink. (ticked correct)

I have reset the browser (chrome)

have you tried refreshing the page then running the code back through the editor ?

Have done that, reckon I will log out, restart in Firefox and see what happens.

<h1 class="pink-test"></h1>
is that what your code looks like ?

no need to do that. can you please copy and past your html ? I need to see more than just the CSS code. thanks!

Your h1 element should have the class pink-text.

There is your problem :slight_smile:

1 Like

I have set the class in the h1 element as you have shown. Sorry, forgot to paste that part.

It has the class pink-test, i missed copying the complete code

body { background-color: black; font-family: Monospace; color: green; } .pink-test{color: pink}

Hello World!

It strips out my complete code when I copy and paste from the online editor
I will paste in notepad and try again

body { background-color: black; font-family: Monospace; color: green; } .pink-test{color: pink}

Hello World!

That’s the problem, it should be .pink-text, with an x, not test.

Strips out the style and h1 elements

Thanks lincore, very embarrassed about such a silly mistake. Damn, i wasted some time because of it.

2 Likes

its okay! it happens to the best of us! I promise! keep your head up and keep trucking right along even when you get stuck!

I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.

Thanks Michael.
I need some more help, ticked the help button and landed on Gitter in the FreeCodeCamp Help, logged in my GitHub account. I cannot find a text input anywhere to state my problem?
This is the current problem:
I’m stuck on Change Text Inside an Element Using jQuery
Here is my code

<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target4").html("<em>target4</em>");
    
  });
</script>

Sorry, got it fixed, should have used #target4

1 Like

okay, awesome!! have a good one :slight_smile: