This property automatically generates content to attach before/after a CSS selector (using the :before and :after pseudo-elements.) One or more keywords may be specified for this property, but the content does not actually exist in the document tree; it is generated “on-the-fly.” The ‘display’ property is used with this property to specify the type of rendering box for the generated content.


em:before {
content: url("ding.wav")

Possible Values

inherit: Explicitly sets the value of this property to that of the parent.
none: Sets the content to nothing
normal: Sets the content, if specified, to normal, which default is “none” (which is nothing)
counter: Sets the content as a counter
attr(attribute): Sets the content as one of the selector’s attribute
string: Sets the content to the text you specify
no-open-quote: Removes the opening quote from the content, if specified
no-close-quote: Removes the closing quote from the content, if specified
open-quote: Sets the content to be an opening quote
close-quote: Sets the content to be a closing quote
url(url): Sets the content to be some kind of media (an image, a sound, a video, etc.)