CSS content

The CSS color property is used to attach content before or after an element whilst using the ':before' or ':after' pseudo-elements.

Syntax: {selector-name}.before { content: <value> }
Possible Values:
  • <sting>
  • <URI>
  • <counter>
  • open-quote
  • close-quote
  • no-open-quote
  • attr
  • inherit
Initial Value: Empty string
Applies to: :before and :after pseudo-elements
Inherited: No
Media: All
Example: img:before { content: attr(alt) }