CSS content Property Reference

The CSS content property is a standard property in CSS Generated Content. Review its formal syntax, computed behavior, and practical declarations.

CSS content Property Reference

The CSS content property is a standard property in CSS Generated Content. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

content overview

The CSS content property is a standard property in CSS Generated Content. Review its formal syntax, computed behavior, and practical declarations.

The property is not inherited by default. Use an explicit global keyword when inheritance is intended.

Syntax and formal definition

content formal syntax
FieldValue
Formal syntaxnormal | none | [ <content-replacement> | <content-list> ] [ / [ <string> | <counter> | <attr()> ]+ ]?
Initial valuenormal
Applies toallElementsTreeAbidingPseudoElementsPageMarginBoxes
InheritedNo
Percentagesno
Computed valuenormalOnElementsForPseudosNoneAbsoluteURIStringOrAsSpecified
Animation typediscrete
Mediaall
Specification groupCSS Generated Content
StatusStandard

Practical examples

These declarations demonstrate valid ways to set content. The initial and inherit global keywords remain available even when a property-specific value is preferable.

content live example
CSS .reset-example { content: initial; } .inherit-example { content: inherit; } @supports (content: initial) { .supported { content: initial; } }

Description

The CSS content property is a standard property in CSS Generated Content. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: content
  2. MDN: CSS Properties Reference

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies