CSS display

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

* Some parts of this feature may have varying levels of support.

The CSS display module defines how the CSS formatting box tree is generated from the document element tree and defines properties controlling it.

Reference

Properties

Data types

Guides

Using the multi-keyword syntax with CSS display

Describes the multi-keyword syntax and compares this syntax with legacy single-keyword values.

Flow layout (display: block, display: inline)

Flexible box layout

Grid layout

Specifications

Specification
CSS Display Module Level 3
# the-display-properties
Scalable Vector Graphics (SVG) 2
# VisibilityControl

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
display
block
contents
Specific behavior of unusual elements when display: contents is applied to them
Elements with display: contents are focusable
Experimental
flex
flow-root
grid
inline
inline-block
inline-flex
inline-grid
inline-table
Transitionable when setting transition-behavior: allow-discrete
@keyframe animatable
list-item
Supported on <legend>
math
Experimental
Multi-keyword values
none
Setting display: none on an <option> element hides it from the dropdown.
Non-standard
ruby
ruby-base
ruby-base-container
ruby-text
ruby-text-container
table
table-caption
table-cell
table-column
table-column-group
table-footer-group
table-header-group
table-row
table-row-group

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
Non-standard. Check cross-browser support before using.
See implementation notes.
Requires a vendor prefix or different name for use.
Has more compatibility info.

See also