Expression Studio 4.0
important noteImportant

This documentation is preliminary and is subject to change.

Sets generated content to insert before or after an element.


{ content: sContent }

Possible values


String that specifies a space-delimited list, including one or more of the following values:


Text content, in either double quotation marks (") or single quotation marks (').

counter(sCounter,[ listStyle])

sCounterA counter identifier, optionally followed by listStyle.
listStyleOptional. Any of the range of values from the list-style-type property.

This property has no default value. It is not inherited.


The content attribute is used in conjunction with :before and :after pseudo-classes to generate content in a document.

Strings can written with either double quotation marks (") or with single quotation marks ('). Double quotation marks cannot occur inside other double quotation marks, unless they are preceded by a backslash (\) escape character. For example, the string "\"" is interpreted as containing one double quotation character.


The following example generates braces before and after all the h1 elements on a page.

<html xmlns="">
<style type="text/css">
h1:before {
    content: "{ ";
h1:after {
content: " }";

Standards information

Applies to

a, abbr, acronym, b, bdo, big, blockquote, body, button, caption, center, cite, code, custom, dd, defaults, del, dfn, div, dl, dt, em, embed, fieldset, font, form, frame, hn, i, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, li, object, ol, p, q, s, span, sub, table, td, th, tt, u, ul, var, xmp

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions