CSS Reference

Quick Reference

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

ul li::before {
    content: "added info before - ";
}
ul li::after {
    content: " - added info after";
}

Default

Default valuenormal
Inherited valuesno
Can it be animated?no

These are the allowed values.

ValueDescription
normalSets the content, if specified, to normal, which default is "none" (default)
noneSets the content to nothing
counterSets the content as a counter
attr(attribute)Sets the content as one of the selector's attribute
stringSets the content to the text you specify
open-quoteSets the content to be an opening quote
close-quoteSets the content to be a closing quote
no-open-quoteRemoves the opening quote from the content
no-close-quoteRemoves the closing quote from the content
url(url)Sets the content to be some kind of media (image, audio, video, etc.)
initialSets this property to its default value
inheritInherits this property from its parent element

CSS Notes:


We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.