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 trialAakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 PointsDRY
I am always confused when I should create a new class for an element. Isn't it bad for structure to have many classes? Is it affecting SEO somehow? Where can I read about it?
2 Answers
Jack Weldon
1,708 PointsSo long as you're using semantic markup SEO doesn't matter to a great extent (Though it can help to label your classes to reflect the content). The only times that I'm aware of where you would not create a class for an element are: The element is relatively simple and doesn't need a class, or you already have a large number of classes that can be used instead of creating a new one - Both of these reflect on how you've written your code and how easy it is to read.
Samuel Pimenta
Courses Plus Student 191 PointsJust go to Facebook, Airbnb or other great sites and hit Ctrl + U;
You'll see the source code with many classes. Don't worry about using many classes for now!