CSS selectors are widely used to apply styling to all instances of a particular element.
To apply the color purple to all the h2s on the page, you can define the following CSS inside a <style></style> block.
h2 {
color: purple;
}
This will apply the color purple to all <h2> headings. If you are using the style="color: purple" attribute on each <h2> element, you can remove it and instead define it in a single place inside a <style></style> block.
I am having a problem with using CCS Selectors to Style elements. Here is a snippet of everything I’ve done. I only have one X and I don’t know how to solve it.
< 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>
I had to make spaces inside tags to could show you the code itself, just remove the space and should be good.
I see from your code in lines 2 + 3 that it looks a little jumbled, I had a similar issue in the placement of the CSS element. I would reset the code and keep CSS style element at the top and away from the actual (h2>CatPhotoApp</h2) as the CSS element will point to this when you declare it, so it should look a little like the code above and you’ll be rockin’!
I have completed this challenge with the same solution that many other users have come to submit.
The one issue that I ran into that may help others here is that the challenge sometimes does not recognize a correct solution when pasting in from an external text editor. I ran into this as I like to edit with an external text editor because it will auto-complete the tags. However, when pasting into the browser and submitting it is incorrect. I instead had to type the solution manually in the browser and submit, then it accepted as correct.
anyone have an example of a period is? lesson says that a css starts with a period and a class declaration doesn’t and I’m confused on the difference of the 2.
I am just as confuse especially since I follow the lesson instruction accordingly. Is there a way that we can contact a Freecodecamp.org admin staff directly with questions pertaining to this lessons?