CSS content Property

Definition and Usage

The content property is used with the :before and :after pseudo-elements, to insert generated content.

Example

The following example inserts the URL in parenthesis after each link:

a:after
{
content: ” (” attr(href) “)”;
}

Browser Support

The content property is supported in all major browsers. CSS version 2

Note: IE8 only supports the content property if a !DOCTYPE is specified

Leave a Reply

Your email address will not be published. Required fields are marked *