CSS Content Property

CSS 1

CSS 2

CSS 3

No Yes Yes

Description

Specifies the content to appear either after or before an element.

Syntax

{selector-name}.before {content: [value];}

Possible values

  • [string]
  • [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

p.note:before {content: "Note: ";}


View All CSS Properties