Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

child

The child selector will target just the specified direct children of an element and not target all of its descendants of that type.
Syntax Logicelement > child{ property_list }

CSS Code Example

<style> div > p{ color: red; } </style> <div> <p>Paragraph content ...</p> <article> <p>Paragraph content ...</p> </article> </div>

CSS

Selectors

universaltypecompoundclassidnotattributedescendantchildadjacent siblinggeneral siblingfirst childlast childonly childfirst of typelast of typeonly of typenth childnth last childnth of typenth last of typeemptyrootfirst linefirst letterbeforeafterlinkvisitedhoveractivefocustargetenableddisabledcheckedlang