CSS content Property


The content property in CSS is used to generate the content dynamically (during run time). It is used to generate content ::before & ::after pseudo element.

The content property is used with the ::before and ::after pseudo-elements, to insert generated content.

CSS Syntax

content: normal|none|counter|attr|string|open-quote|close-quote|no-open-quote|no-close-quote|url|initial|inherit;

Supported Browsers:

  • Firefox: 52.0, 2.0 -moz-
  • Google Chrome: 50.0, 4.0 -webkit-
  • Internet Explorer: 10.0
  • Safari: 9.0, 3.1 -webkit-
  • Opera: 37.0, 15.0 -webkit-, 11.1

Example -