HomeReferencesCSS Properties

CSS Property: content

Specifies generated content that can be displayed before or after an element. Used in conjunction with the :before and :after pseudo-elements. Not supported by IE.

HTML Dog, The Book HTML Dog book cover

HTML Dog is hosted by Titan Internet

Possible Values

  • inhert
  • [URI]
  • [string]
  • normal - no generated content
  • open-quote - the content defined by the quotes property (' " ' by default).
  • close-quote - the content also defined by the quotes property (' " ' by default).
  • no-open-quote - No opening quote is applied, but the nesting order is maintained.
  • no-close-quote - No closing quote is applied, but the nesting order is maintained.
  • attr([attribute name]) - the value of attribute [attribute name] in the HTML tag that is the subject of the selector.
  • counter([name], [style]) - the current value of counter [name]. The optional [style] is a value equivalent to that of list-style-type. Only supported by Opera at the time of writing.
  • counters([name], [string], [style]) - the current values of all counters called [name], separated by [string]. The optional [style] is a value equivalent to that of list-style-type. Only supported by Opera at the time of writing.

Example


p:before { content: url(images/quote.gif); }

p:after { content: close-quote; }

li:before { content: ">>"; }