Example

A simple background-color property example:

Laboratory

description & Usage

To create a text, we must use the content property.

Informations

# Description
Default Value normal
Inherited no
Animatable no
Version CSS2
JavaScript syntax You can't give an element a pseudo-class by using JavaScript,

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
content

Syntax

Values

Values Description
normal Adjusts content normally.
none It does not set the content to any state.
counter Sets the content as a counter.
attr(attribute) Sets the content as one of the properties of the selector.
string Sets the content to the mode selected by the user.
open-quote Sets the inserted content as a first quote.
close-quote Sets the inserted content as an end quote.
no-open-quote Removes the first quote from the text.
no-close-quote Removes the end quote from the text.
url(url) It sets the content in the context of an audio or video media.
initial Adds this value to its default property.
inherit It inherits this value from its parent tag.