Difference between div p {} and div > p {} in css | SoloLearn: Learn to code for FREE!

0

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

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

8/19/2020 1:01:26 AM

Adeniyi Olaitan

2 Answers

New Answer

+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

0

Divya Mohan Ohhhh Thanks bro, I got it now, so ">" is like a direct child selector