CSS Child Selector

Use the child selector, if you want to select all elements immediate children of a specified element.

div > p


You can try to run the following code to implement CSS Child Selector

Live Demo

<!DOCTYPE html>
         div > p {
            background-color: orange;
         <p>Para 1 in the div.</p>
         <!-- This is not a Child -->
         <span><p>Para 2 in the div.</p></span>
      <p>Para 3 outside the div.</p>