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 How to Make a Website Adding Pages to a Website Style New Pages

Daniel Oropeza
Daniel Oropeza
4,432 Points

In the CSS, why do we need to declare the class as ".profile-photo" and not "profile-photo"? lol

That's it.

The period means its a 'class selector'. If you were to use something else like a '#', it would style a single element. the '.' means it would style all of the elements under profile-photo. Hope that helps!

2 Answers

james niemerg
james niemerg
1,001 Points

Charles is right. the period represents a class element in your html. Selectors without a period or # are an html tag like <h1> or <p>.

Daniel Oropeza
Daniel Oropeza
4,432 Points

Thank you guys. It's a class selector... makes sense. I'll just get the hang of when to use which type of selectors as I go on I suppose.