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 trialAndrea Rios
Front End Web Development Techdegree Student 10,078 PointsWhich of the following pseudo-classes can we use to target elements with no child content?
I was not able to figure this one out.
The answers were not() also :empty, i think onlychild and something else.
I don't understand the question.
I still passed the quiz, but I had this one wrong.
Thank you!
1 Answer
Steven Parker
231,269 PointsThe question is asking for a way to identify elements that have no child elements. Another way to describe an element has no child elements inside it would be to call it "empty".
So the :empty
pseudo-class would target elements that have no contents. None of the other choices are selectors that work based on a lack of contents.
Andrea Rios
Front End Web Development Techdegree Student 10,078 PointsAndrea Rios
Front End Web Development Techdegree Student 10,078 PointsAwesome! Thank you Steven!