display: contents
The display: contents CSS declaration sets an element to display only its contents, not itself.
Status
Limited availability
MDN documentation
Specifications
Browser support (view on caniuse.com)
- Chrome ❌ See bugs.chromium.org/p/chromium/issues/detail?id=1366037 bugs.chromium.org/p/chromium/issues/detail?id=657748 crbug.com/40866683
- Chrome Android ❌ See crbug.com/40866683
- Edge ❌ See crbug.com/40866683
- Firefox ❌ See bugzil.la/1791648 bugzil.la/1553549 Vendor position : positive
- Firefox for Android ❌ See bugzil.la/1791648 bugzil.la/1553549 Vendor position : positive
- Safari ❌ See webkit.org/b/255149 Vendor position : neutral (concerns: accessibility)
- Safari on iOS ❌ See webkit.org/b/255149 Vendor position : neutral (concerns: accessibility)
Surveys
- State of CSS 2025 > usage > gamechanger feature
- State of CSS 2025 > usage > favorite new features
- State of CSS 2025 > usage > css interoperability features
- State of CSS 2025 > reading list > reading list
- State of CSS 2025 > other features > other features pain points
- State of CSS 2025 > layout > layout pain points
- State of CSS 2025 > features > all features
Web Platform Tests (WPT)
View the latest WPT test results for this featureDeveloper votes
Do you need this feature?
Let us know by leaving a 👍 reaction on the feedback issue. Don't forget to also leave a comment explaining your specific use case.
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist