::after

noun

say it: “AF-ter” /ˈæftər/ or “DUB-ul KOH-lun AF-ter” /ˈdʌbəl ˈkoʊlən ˈæftər/

A pseudo-element that adds a box at the end of an element's content. Like ::before, it shows nothing without a content value, and it suits decoration, not real information.

What does ::after do?

::after adds generated content at the end of an element, set with the content property.

.external-link::after { content: " ↗"; }

In a sentence

  • “With ::after, every link that leaves the site gets a small arrow at its end.”

Level: Apprentice · More CSS terms at this level

Updated