I am finding it hard to get this css coding right. Can anyone help?

Tell us what’s happening:

Your code so far

<style>
  h2{color: blue;}CatPhotoApp
</style>  

<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 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0.

Link to the challenge:
https://www.freecodecamp.org/challenges/use-css-selectors-to-style-elements

why ??? whats the prob??

The text “CatPhoto App” shouldn’t be in the style tags. It should be outside the style tags with h2 tags of its own

Hi Jerrytboy,

You use HTML to create the structure of your page and the CSS to style that same structure.

In your example, what’s inside the style tags is actually CSS, which is used to style your HTML.
So, if you want to style your h2, you still have to create those tags on your page so you can reference it in your style.

Here’s an example:

<style>
  h2 {
color: blue;
}
</style>  

<h2>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>

Notice we’re defining the content inside the h2 and we’re styling it inside the style tags.

Hope this helps, and good luck with your learning!