css get first chield of element code example Example: select first child in element css p:first-child { background-color: yellow; }