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! While you're at it, check out some resources Treehouse students have shared here.

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

CSS CSS Selectors Advanced Selectors Pseudo-Elements - ::first-line and ::first-letter

Pseudo Classes and Pseudo Elements

Can someone please give me an example of a Pseudo Class and a Pseudo Element? I read the answer explaining the difference but I still don't understand/see the difference.

When would you use a Pseudo Class? When would you use a Pseudo Element?

Thanks everyone.

1 Answer

Justin Cantley
Justin Cantley
18,068 Points

This site has some pretty good examples and explains the difference in an easy to understand way. http://www.growingwiththeweb.com/2012/08/pseudo-classes-vs-pseudo-elements.html

Thank you for the reference, Justin Cantley. It's clear as mud now. Lol.

Justin Cantley
Justin Cantley
18,068 Points

No problem. Hope this clears some things up for you.