Html to CSS cant pass

Html to CSS cant pass

Well I thought that I have to put those back flips or whatever is name of those.

next time also please use the “Ask for Help” button, or at least link the challenge
because if it is this one:

this is what you need to do:

Delete your h2 element’s style attribute, and instead create a CSS style block. Add the necessary CSS to turn all h2 elements blue.

but it doesn’t correspond to what you are saying

you didn’t put any backticks around your line of code there…

Sorry it s this one

look at your semicolon, look at the example code

An example from W3Schools:

<h1 style="color:blue;">This is a Blue Heading</h1>

As said above, the correct syntax is to put the semicolon inside the quotation marks, as that semicolon is a required part of the CSS syntax.

1 Like

Change your h2 element’s style so that its text color is red.

I did it correctly


It wont let me pass over and over again for last 2 days.

I did all of that and it s just h2 and red color same code i typed and I can see Heading changed to red on right side. But when I press run tests it said that h 2 element should be red.

your issue is the semicolon, look where it is in your code and where it is in the exampe code

It s not. It s same code. And guy in video said the same thing I bassicly copied ad it won t let me pass but core is correct.

your semicolon is outside quotes

Can you please repost your latest code attempt? Make sure to use backticks ``` on the line before and after the code you paste, so that it shows up correctly on the forum.

<h2 style="color: red ;">CatPhotoApp</h2>

When I try the code you posted above, it does seem to pass. Can you try refreshing your page (Ctrl+F5 on Chrome using Windows) and use the same code again when running the tests? You may also need to click Reset All Code first.

If the code you have posted does not work, make sure you do not have an extension installed that is changing the page. Like any dark mode extension will need to be disabled. You can use the dark mode theme under the profile settings instead.

If that isn’t the issue then try using a different browser.

1 Like

HAHAHAHA it worked thanks man so much.Can t believe it was because dark mode.And why did that happen and how did you know?

The extension changes the style of the page and the test is looking at the styles, so it fails.

I know because it is a (ridiculously) common problem that we really should have taken care of by now. Either by changing the test, or adding a note to the challenge.

Edit: I made a PR for this. Let see if that fixes it.

@CaptainMakaveli BTW, can I ask what the name of the extension you are using is?

@lasjorg I use dark reader extension.