pseudo-element

::after — CSS reference

Creates a generated pseudo-element at the end of the originating element’s content when content generates a box. It is not an inserted DOM child; normal or none suppresses generation here. Replaced elements generally do not provide these generated children. Keep essential text in HTML, not CSS.

Formal Syntax & Structure

css syntaxcss
element::after { content: "text"; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#a::after { content: "End"; color: #006050; }</style><body><p id="a">Article</p><p id="b">Plain</p></body></html>
CSS Reference