← TechnologyThe essentials of

::before is suitable for decoration, but not for the main text

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 13:48. This is not editorial approval.

In a few sentences

In brief

::before creates a pseudo-element before the selected element’s content.

Useful to know

::before creates a pseudo-element before the selected element’s content. It is commonly combined with content to provide an icon, symbol or decorative shape. [1]

For example, .note::before { content: "• "; } adds a bullet. The main warning still needs to appear in the HTML because generated text is not handled identically by all assistive technologies. With content: "", the pseudo-element can be purely decorative. Order numbers, required instructions and labels should remain accessible independently of the stylesheet.

Sources

For further detail and to check the information:

  1. [1] MDN — ::before ↗