CSS: pseudo-element selector (::)

By Xah Lee. Date: . Last updated: .
tag::first-letter

the first letter of a tag element.

tag is optional. It can be a simple selector (selecting by tag name, id, class etc) or a compound selector (combination of tag name, id, class etc). If empty, it means the universal selector (* any tag).

tag::first-line

the first rendered line of a tag element.

tag::before

insert content before a tag element.

tag::after

insert content after a tag element.

tag::marker

Selects the marker box of a list item.

Other pseudo-element selectors

CSS. pseudo-element and pseudo-class

CSS. Selectors

Selector types
Simple selectors
Combinators
Selector list
Nesting syntax
Special selector
Misc