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

HTML How to Make a Website CSS: Cascading Style Sheets What is CSS?

Abdelkarim Lyoussi
Abdelkarim Lyoussi
3,657 Points

What is the difference between "nav > a{}" and "nav a{}". Thanks!

Hi, I have noticed in many websites that people tend to use the descendant selection with a different annotation than the one that has been used in the course. So, I wonder if there is any difference between them. Thanks

2 Answers

Abdelkarim Lyoussi
Abdelkarim Lyoussi
3,657 Points

Thanks Denis for your prompt answer :)

Denis Florjančič
Denis Florjančič
9,169 Points

There is a difference between nav a (descendant selector) and nav > a (child selector). Here you can see examples of this two and few others css combinators http://www.w3schools.com/css/css_combinators.asp

//Changed comment to answer