Definition The content property is used with the :before and :after pseudo-elements to generate content to attach before or after a CSS sele...
Definition
The content property is used with the :before and :after pseudo-elements to generate content to attach before or after a CSS selector.Inherited: No
JavaScript Syntax
CSS properties can also be dynamically changed with a JavaScript.Scripting Syntax: object.style.content="url(beep.wav)"
Example
p:before { content: url("beep.wav") } img:before { content: attr(alt) } |
Possible Values
Value | Description |
---|---|
string | Defines text content. Default value is "" |
url | Defines a url |
counter(name) counter(name, list-style-type) counters(name, string) counters(name, string, list-style-type) | |
attr(X) | Defines an attribute of a selector to be displayed before/after the selector |
open-quote | |
close-quote | |
no-open-quote | |
no-close-quote |
Goto CSS3 and CSS2 complete reference