Properties
CSS
content
The content property is used with the :before and :after pseudo-elements to generate content in a document.
CSS2
content: normal | none | [ <string> | <uri> | <counter> | attr(<identifier>) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
| Initial: | normal |
| Applies To: | :before and :after pseudo-elements |
| Inherited: | no |
| Percentages: | NA |
| Media: | all |
Note: Doctype is required for Internet Explorer 8+
Values
content: value;
| Value: | Description: |
| attr | Inserts the value of an element's attribute |
| close-quote | Replaces close quotation mark with a string from the quotes property |
| counter | Inserts a variable using counter(name), counter(name, style), counters(name, string), or counters(name, string, style) |
| inherit | Takes the same computed value as the property for the element's parent |
| no-close-quote | Removes close quotation mark |
| no-open-quote | Removes open quotation mark |
| none | Pseudo-element is not generated |
| normal | Computes to none for the :before and :after pseudo-elements |
| open-quote | Replaces open quotation mark with a string from the quotes property |
| string | Inserts text |
| uri | Inserts an external resource such as an image |
