Every time i run a program it mark as untick, even if the answer is correct

<style>
body {
  background-color: black;
  font-family: monospace;
  color: green;
}
.pink-text {
  color: pink;
.blue-text{
  color: blue;
}
}
</style>
<h1 class="pink-text blue-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.

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

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

Please always provide a link to the challenge. We don’t have them all memorized. In the future the Get Help -> Ask for Help button will do all that for you.

But looking at it, should your h1 have two classes?


OK, I was just guessing. I was guessing because you didn’t provide a link to the challenge.

You still haven’t provided a link to the challenge.

But looking more closely at your code, you are missing a closing curly brace for the first class. Notice that the two classes have different colors.

Oh, I see, it’t there, just in the wrong place so the CSS isn’t getting parsed correctly.

As said, you have nested the .blue-text selector inside the .pink-text selector.

.pink-text {
  color: pink;
  .blue-text {
    color: blue;
  }
}

That isn’t valid syntax in plain CSS. You would have to be using SASS/SCSS for that to work. The .blue-text selector has to come after the .pink-text selector.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.