style.content (Property)

A means of adding small fragments of HTML before and after an element without that HTML needing to be coded into the document source with the styled element.

Availability:

CSS level - 2
DOM level - 2
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myStyle.content
CSS syntax:content: someContentRef
Argument list:someContentRefA URL, string or value to be placed before or after an element

If you have a generic effect you want to achieve that goes beyond what is possible with a simple property or style attribute and can only be accomplished by additional fragments of HTML, this property provides a way to add fragments of HTML before and after an element.

The string to be assigned to this should be a valid fragment of CSS text that uses the before: and after: pseudo elements to define leading and trailing fragments of HTML.

This is a relatively new part of the CSS standard and does not yet have a well defined JavaScript binding.