0

Difference between div p {} and div > p {} in css

https://code.sololearn.com/WtDrw3cU3WzT/?ref=app

19th Aug 2020, 1:01 AM
Adeniyi Olaitan
Adeniyi Olaitan - avatar
2 Antworten
+ 1
blank space specify general children selector which can select child , grandchild .... element. But > is child selector it select child element only. If you have any span tag inside p like div p span You can't select it like div > span But can select using div span
19th Aug 2020, 1:39 AM
Divya Mohan
Divya Mohan - avatar
0
Divya Mohan Ohhhh Thanks bro, I got it now, so ">" is like a direct child selector
19th Aug 2020, 9:11 AM
Adeniyi Olaitan
Adeniyi Olaitan - avatar