Important Notice:

Course Content
Float Property
0/1
Z-Index
0/1
CSS object-fit Property
0/1
CSS Visibility Property
0/1
CSS (Chapter 4) M2-R5.1
About Lesson
Child Selector:-

            इसे भी आप Sub-selector की तरह समझ सकते हैं लेकिन किसी भी element के child पर CSS rule को apply करना चाहते हो तो Child Selector का इस्तेमाल करते है। इसमे parent selector के बाद >  greater than symbol लगाया जाता है और इसके बाद child selector को लिखा जाता है।

Note:- यहा <p> tag के अंदर <b> tag पर style rule apply नहीं होगा क्योकि <b> tag <p> का child है और हमने यहा style rule <div> के child <b> पर apply किया है।

Child Selector:-

                        You can also understand this as Sub-selector, but if you want to apply CSS rule on the child of any element, then use Child Selector. In this, > greater than symbol is put after the parent selector and after this the child selector is written.

Note:- Here the style rule will not be applied on the <b> tag inside the <p> tag because <b> tag is the child of <p> and here we have applied the style rule on the child <b> of <div>.

error: Content is protected !!