The :first-child pseudo-class represents an element that is the first child of some other element.

:first-child {
    css declarations;
}
p:first-child {
   color: #3366ff;
   background: #ffff99;
}

Click the button below to experiment with this selector.

Give it a Try!

3.0Firefox 7.0Explorer 4.0Chrome 3.1Safari 9.6Opera