CSS container Property Reference

The CSS container property is a standard property in CSS Conditional Rules. Review its formal syntax, computed behavior, and practical declarations.

CSS container Property Reference

The CSS container property is a standard property in CSS Conditional Rules. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

container overview

The CSS container property is a standard property in CSS Conditional Rules. 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

container formal syntax
FieldValue
Formal syntax<'container-name'> [ / <'container-type'> ]?
Initial valuecontainer-name, container-type
Applies toallElements
InheritedNo
Percentagescontainer-name, container-type
Computed valuecontainer-name, container-type
Animation typecontainer-name, container-type
Mediavisual
Specification groupCSS Conditional Rules
StatusStandard

Practical examples

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

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

Description

The CSS container property is a standard property in CSS Conditional Rules. Review its formal syntax, computed behavior, and practical declarations.

References

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

Similar or alternative tools

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