Hi im a beginner please tell me what was the wrong in this

<style>

h2{color: blue}

</style>CatPhotoApp</h2>

Question is unclear. Please post the link to the problem that you are solving.

All css style tags must end with ;
so your code should read style=“color:blue;”

Can you give the Challenge link?

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Also, 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 (’).

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 (’).

Your way of writing the markup and styling them is wrong. Have a look on how a HTML file is structured.

So coming to your question,

Problem No 1 :

<style>

h2{color: blue}

</style>

Whenever writing CSS there is a specific format which is as follows,

you first open and close the style <style></style> tags and in between them you define the tags, classes or the id value of the element which you want to style,

<style>
h1{
color: "green";
}
</style>

Notice above on your code you missed the inverted commas.

Problem Number 02:

You have missed a

opening tag on your code

Just to clear up confusion, this is not necessary :slightly_smiling_face:

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