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 Foundations Selectors Class and ID Selectors

Gavin Broekema
Gavin Broekema
Full Stack JavaScript Techdegree Student 22,443 Points

Use class or type selector?

So this is what I got out of the lesson:

  1. Use class selectors if the styling is going to be used in more than one instance.
  2. Also class selectors to add semantic meaning.

Are these assumptions correct?

1 Answer

Yes, type selectors also help add consistency to all of your page documents. If you want to make a change to one of the properties or attributes on all of the pages you just make one change in your css rather than having to make the change in all of your corresponding documents.