Why Change the Color of Text is not working?

Tell us what’s happening:

Why my Exact text is not accepted by freecodecamp?

Your code so far

<h2style="color: blue">CatPhotoApp</h2>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (X11; CrOS armv7l 10176.76.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.190 Safari/537.36.

Link to the challenge:

You need a space between the element name and the style attribute. Also, style property/value pairs should end with a semi-colon.

thank you for the prompt reply. I typed exactly what the hint said. You said semi colon but the directions are for (:slight_smile:
Also, the answer says the h2 needs to be in red but it can’t be in red unless style is connected but the directions and you say to have a space.

The directions and answer appear to be incorrect and I can not progress. I would Super appreciate any idea how to solve this so I can finally move on

The example in the challenge showed how you could make a specific h2 element’s text blue (see below).

<h2 style="color: blue">CatPhotoApp</h2>

To make the h2 element’s text color red, you just need to change the color from blue to red. That is all you have to do. The challenge may still pass without the semi-colon, but technically the correct syntax would be to have a semi-colon at the end, because if you have more than one property/value pair, the semi-colon would separate each one. In general, it is best to just put the semi-colon in even if there is only one property/value pair, so that you get in the habit for multiple pairs.

Hi, I tried the semi colon but it didn’t work. How to change the color to red? Mine is still yellow but exactly as instructed.
How to change the colors from blue to red? this is my text:

<h2 style="color: blue">CatPhotoApp</h2>

I’m very new to this. I really appreciate your help.

Now I can’t even show you my text because it came up CatPhotoApp. How can i show you exactly what I typed? How to change the color from red to blue?

Why can’t i progress if I’m typing exactly what the program asks me to type? I’ve been at this for nearly 1 hour so far

I’ve edited your post for readability. 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.


Just change the word blue to red in your code. It is as simple as that.

Hello, thanks for the clarification of backticks for the element in question and simply changing the word blue to red.
All the best,