CSS Pseudo-elements

Pseudo-elements style specific parts of an element.

Tutorials dojo strip

::Before

The ::before pseudo-element inserts content before an element’s actual content.

CSS


::After

The ::after pseudo-element inserts content after an element’s actual content.

CSS


::First-line

The ::first-line pseudo-element applies styles to the first line of text inside an element.

CSS


::First-letter

The ::first-letter pseudo-element applies styles to the first letter of the first line of text inside an element.

CSS




CSS Pseudo-elements Example Code

HTML/CSS




CSS Labs

Tutorials dojo strip