:first-childpseudo-class applies to elements which are the first child of their parents. You can get that information from the DOM tree, but there’s no
In CSS2.1, there were a handful of pseudo-classes available, notably the link states (
:visited) and those of user actions (
:hover). In CSS3, that handful becomes a basketful, with pseudo-classes of structure (
:nth-of-type), UI element (
:checked), and the ones we’ll look at now, of form validation.
View original post 1,048 more words