Css selectors style to element

There the problem l can’t get h2 element to change to blue. Where l’m now https://www.freecodecamp.org/challenges/use-css-selectors-to-style-elements.

You need to copy/paste the code you are trying into a reply. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make 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.


It can be done. Double check everything or post the code here as @RandellDawson has instructed.


  1. Remove style = “color: red” from your h2 tag.
  2. At the top of the lines of code, put this:
h2 {
      color: blue;

@33Coder - If you have the above style tag code shown by @LisaWillCode, your code should work as long as you followed the challenge’s instruction to “Delete your h2 element’s style attribute”. If you are still seeing red text, you did not delete the h2 element’s style attribute in the original code.

1 Like