1. Home
  2. Computing & Technology
  3. Web Design / HTML

content

By , About.com Guide

content Description:

The content property defines content that will be generated by the style sheet for use with :before and :after pseudo-elements.

content in CSS Versions:
content Syntax:

content: normal | none | <string> | <uri> | <counter> | attr(<identifier>) | open-quote | close-quote | no-open-quote | no-close-quote | inherit

  • normal
    Acts like "none" for :before and :after pseudo-elements.
  • none
    Do not generate the pseudo-element.
  • <string>
    Display the text string.
  • <uri>
    Display an external resource like an image.
  • <countert>
    Display an integrated counter.
  • attr(<identifier>)
    The value of the attribute specified for that element.
  • open-quote and close-quote
    Display the appropriate quotation string.
  • no-open-quote and no-close-quote
    Do not display quotation marks, but increment the quotation nesting.
  • inherit
    The element should have the same content setting as the parent.
content Initial Value:

normal

content Applies To:

:before and :after pseudo-elements.

content Inheritance:

This property is not inherited.

content Browser Support:
content media type:
  • All

content Examples

Put quotes around all blockquote entities

<style>
blockquote:before { content : open-quote; }
blockquote:after { content : close-quote; }
</style>
content Special Notes:
  • Internet Explorer does not support this property.

More content Information

Return to the Style Library

Explore Web Design / HTML
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: content>

©2010 About.com, a part of The New York Times Company.

All rights reserved.