Use CSS Selectors to Style Element

Tell us what’s happening:
Please I need help.
My h2 elements didn’t change to blue despite all my trials…
Thanks

Your code so far

<style>
<h2 {color: blue;}<CatPhotoApp</h2>
</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 (Linux; Android 6.0; TECNO-W3 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36.

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

You don’t put tags themselves between the <style> tags. It’s just h2 {color: blue;}.

The actual <h2> element comes after the closing </style> tag.

I really do not get it but let me go try out as you have highlighted.

Thanks

Your code should look something like this:

<head>
<style>
h2  {
color:blue;
}
</style>
</head>
<body>
<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>
</body>

Best :slight_smile:

1 Like