css only first level of class child code example Example: select first child in element css p:first-child { background-color: yellow; }