p:first-child { color: green; } css code example Example: first-child p:first-child { background-color: yellow; }