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 - ::before and ::after

Does "source code" = the HTML document?

The notes state pseudo-elements "do not appear in the source code". I'm guessing the source code, in this context, is the index.html file. Is this right?

2 Answers

Justin Horner
Justin Horner
Treehouse Guest Teacher

Hello Andrew,

I believe you are correct in that pseudo-elements can be selected by your CSS, but they are not actually in the HTML markup. So as an example, you can change the way the first letter looks in a paragraph, without putting "::first-letter" in the HTML yourself.

I hope this helps. If you have any other questions please let me know.

Yes, the source code, or page source, refers to the contents of the html file.