Pseudo-clases

:first-child y :last-child

Paragraph 1

Paragraph 2

Paragraph 3

Paragraph 4

:first-of-type y :last-of-type

Paragraph one

text in span

Paragraph two2

Text in strong
This is a div

Paragraph three

:nth-child() y :nth-last-child()
:nth-of-type() y :nth-last-child()

Paragraph one

text in span

Paragraph two2

Text in strong
This is a div

Paragraph three

:only-child

single paragraph

:only-of-type()

Paragraph one

text in span

Paragraph two2

Paragraph three