Pseudo-element

Styles part of an element, or adds decoration, with two colons.

What is a pseudo-element?

A pseudo-element styles a part of an element, or adds something that isn't in the HTML, like a first line or decoration before it. It starts with two colons.

p::first-line { font-weight: bold; }
.required::after { content: " *"; color: red; }

Level: Apprentice · More CSS terms at this level

Updated