Pseudo-class :first-of-type

The :first-of-type pseudo-class represents an element that is the first sibling of its type in the list of children of its parent element. Same as :nth-of-type(1).


selector:first-of-type{ properties }


It is a valid description for the first two dt elements in the following example but not for the third one:


 dl dt:first-of-type{
   color: red;


        <dd>multistage rocket</dd>
        <dd>nest of tables</dd>

Css3 selectors first-of-type.png

CSS defines the :first-of-type pseudo-class selector in :first-of-type pseudo-class.

Last modified on 26 September 2011, at 20:49