Child Filters
Child filters acquire the children of each element in the set of matched elements, optionally filtered by a selector. Following are the methods of child filters.
First Child: :first-child filter
The :first-child filter can be used to select the first child from the parent element.
The :last-child filter can be used to select the last child from the parent element.
nthchildfilter: :nth-child Filter
The nth-child filter can be used to select all elements which are matched with the nth child of the parent element.
The :only-child filter can be used to select all single child from parent.