Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Evans B. Ofori
Courses Plus Student 13,720 PointsCSS Selector task 7/10
Is there anybody who could please explain the question below?
Add the class "important" to the CSS rules and make that class color red. Then add that class to the last paragraph.
8 Answers

James Barnett
39,199 Points@Evans -
What the instructions are basically saying is ...
- Add a class named
important
to the HTML markup - Create a CSS selector targeting the class
important
- Create a CSS rule to style the text color as red for elements with the class
important
If you're still having issues post your code here, and we see if we can point you in the right direction.

Evans B. Ofori
Courses Plus Student 13,720 PointsThanks a lot James! You really illuminate me!

James Barnett
39,199 Points@Evans - You're quite welcome

Robert Bilic
6,155 Points*html/
<h3 class="important">Hello World</h3>
*CSS/
p:last-child.important { color: red; }
This is wrong. I need help pls.

Robert Bilic
6,155 Points<h3 class="important">Hello World</h3>

James Barnett
39,199 Points@Robert - You are over thinking this, don't need to use last-child
.
Instead just add a class named important
to your html, then style the class named important
.

Robert Bilic
6,155 Points@James - thanks. I'm new in this :)

James Barnett
39,199 Points@Robert - You're quite welcome