Description »

Used to put content before a selector's element.

Details »

This pseudo-element is used to put content a selector's element. Under typical circumstances, the property, content, is used with this so that content can be displayed. This is handy dandy for most browsers, but to get this to work in Internet Explorer, a !DOCTYPE specification is required.

Examples »

On this page, we use the :before pseudo-element in order to display "Cool" in front of the <h4> headers.

h4:before{    content:"Cool, "; }

Try It on the CSS Zone Sandbox!

Base CSS »

Not defined in Base CSS.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License