HTML and CSS Reference
In-Depth Information
Name
display
CSS2.1 values:
none | inline | block | inline-block | list-item | table | inline-table | table-row-
group | table-header-group | table-footer-group | table-row | table-column-group |
table-column | table-cell | table-caption
CSS3 values:
none | inline | block | inline-block | list-item | run-in | compact | table | inline-
table | table-row-group | table-header-group | table-footer-group | table-row |
table-column-group | table-column | table-cell | table-caption | ruby | ruby-base |
ruby-text | ruby-base-container | ruby-text-container
Initial value:
inline
Applies to:
All elements
Inherited:
No
Computed value:
Varies for floated, positioned, and root elements (see CSS2.1, section 9.7); otherwise, same as
declared value
Description:
Defines the kind of display box an element generates during layout. Gratuitous use of display
with a document type such as HTML can be tricky, as it upsets the display hierarchy already
defined in HTML, but it can also be very useful. In the case of XML, which has no such built-
in hierarchy, display is indispensable.
The value none is often used to make elements “disappear,” since it removes the element and
all of its descendant elements from the presentation. This is true not just in visual media, but
Search WWH ::




Custom Search