FCC Challenge 10: Use a CSS Class to Style an Element
March 06, 2016
In FCC Challenge 10, you’re required to change the style selector to .red-text and the color to red. At the same time the ‘red-text’ class should be appended to the h2 element:
[html]
CatPhotoApp
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
[/html]The modified code should be:
[html]
CatPhotoApp
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
[/html]Classes are reusable styles that can be added to HTML elements.
Here’s an example CSS class declaration:
[html]
[/html]
You can see that we’ve created a CSS class called blue-text within the [html]