CSS First Child Selector (original) (raw)

Last Updated : 12 Sep, 2024

CSS :first-child selector is used to select the elements that are the first child of the parent element.

**Syntax:

:first-child { /* CSS property */ }

**Example 1: This example shows the use of the CSS first child selector.

html `

first child selector