Home Menu

nth-child

The nth-child CSS pseudo-class represents elements that are among An+Bth elements from the list composed of their inclusive siblings that match the selector list S.

Syntax

selector:nth-child(An+B [of S]? ) {
    property: value;
}

Examples

An+B

of S

even

odd

Internal

first-child

first-of-type

last-child

last-of-type

nth-last-child

nth-last-of-type

nth-of-type

only-child

only-of-type

External

World Wide Web Consortium (W3C)

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms