This page demonstrates common CSS pseudo-classes (state-based selectors) and pseudo-elements (virtual elements like parts of text).
:link, :visited, :hover, :active, :focus:hover, :active, :focus, :disabled
:not(), :nth-child(), :first-child, :last-childTag Highlighted Another More
::before and ::afterDecorated heading using ::before and ::after
::first-letter and ::first-line
Drop caps are a classic layout effect. The first letter of this
paragraph is styled bigger using ::first-letter.
Only the first line of this paragraph is transformed to uppercase to
demonstrate ::first-line. Resize the window or change zoom
to see where the first line ends.
::selection, ::marker, and ::placeholderTry selecting this text with your mouse to see custom selection color.
::marker