The content property dictates what is rendered inside the element or pseudo-element. It takes a comma separated list of URIs followed by a space separated list of tokens. If there are multiple URIs provided, then each is tried in turn until a value which is both available and supported is found.

  • Initial valuenormal
  • Applies to:before and :after pseudo-elements
  • InheritedNo
  • MediaAll
  • Computed valueSpecified value
  • AnimatableNo
  • CSS VersionCSS2, CSS3
  • JavaScript syntaxobject.style.content
Formal syntax: [ <uri> ',' ]* [ normal | none | inhibit | <content-list> ]

content: [value];
  • <string>
  • <uri>
  • <counter>
  • open-quote
  • close-quote
  • no-open-quote
  • no-close-quote
  • attr
  • inherit
.class:before {
   content: "Note: ";
}
1.0+Firefox8.0+Explorer1.0+Chrome1.0+Safari4.0+Opera


Last updated on 24th May 2015 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.