B.25. content

Sometimes it makes sense to generate some text at the beginning or end of an element as part of that element's style. Termed generated content, this text is not part of the HTML document, but is generated purely by the style sheet. The CSS content property is intended for this purpose. You must apply it to the :before or :after pseudo-elements , as shown in the examples below.

Inherited: No

See also: Section B.26counter-increment, Section B.27counter-reset, Section B.91quotes

B.25.1. Value

The CSS2 specification mandates a number of different generated content formats, but several are not yet supported by current browsers (see the Compatibility section for details). You can use any combination of the following content formats ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.