CSS Descendant Selector



The descendant selector in CSS is used to match all elements that are descendants of a specified element.

Example

You can try to run the following code to implement CSS Descendent Selector:

Live Demo


   
      
   
   
      
         

Para 1 in the div

         

Para 2 in the div

     
     

Para 3 outside the div.

   

Output

Updated on: 2020-06-22T10:58:36+05:30

296 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements