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 trialSauli Laitinen
5,992 PointsClasses
Where could I find more information about the classes? The way how ".social-icon" was used instead of some other way of styling the icons is not quite clear.
3 Answers
Errol Ikalina
353 PointsFor example classes are sometimes used instead of IDs because you can have multiple classes in one page whereas you can only have one ID per page. For example, if you want to apply a setting to several elements in one go you would use class and apply the class to all of them and the settings will be applied to all elements that has that particular class name. Ids on the other hand can only appear once on a page and is particular to one element. You can have many IDs but no IDs can have the same name.
Hope this helps a bit.
Sauli Laitinen
5,992 PointsThanks, this helped a lot.
Sauli Laitinen
5,992 PointsThanks, this helped a lot.