Search within TutorialsPark

CSS Pseudo Class Selector :first-child

Selects elements that are the first children of their containing elements

Definition and Notes.

1. Use this Selector to apply CSS styles to first of however many children an element may contain.

2. Eg: li:first-child will select the first child of however many children the <li> element may have.


CSS :first-child Pseudo Class selector. internetexplorer safari firefox opera chrome

View in Splitscreen»


Note: It can be used to apply a seperate style to first child of any element.

Related Examples.