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 Basics (2014) Basic Selectors ID and Class Selectors

Jordan C
Jordan C
6,249 Points

Why are classes being used here instead of IDs?

It seems like the classes used in this will only be used once, so why aren't IDs used instead?

1 Answer

blake guyan
blake guyan
8,297 Points

you've not shown your workspace so i dont know to what you are referring. personally i ONLY use IDs for something i know to be unique. so i tend to use classes generally and IDs specifically rather than the other way round. i dont know about anyone else though