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
subash maharjan
2,506 PointsWhy didn't we add "ul." in front of ".contact-info li.phone a" to make it "ul.contact-info li.phone a"?
My general assumption tells me i could add "ul." before ".contact-info li.phone a". Aren't we supposed to start selectors with parents?
1 Answer
Steven Parker
243,331 Points
The specificity of a selector should be appropriate for the document.
The class .contact-info is probably not applied to other elements in the document, and since li elements are always children of ul elements, the extra specificity is unnecessary.
It's also quite common to see selectors that begin with a class, or are composed entirely of just a class.