Specifies how to display the element.
Platform Support
| IE | Netscape | Mozilla | Opera | Safari | 5.0+ | 4.0+ | 1.0+ | 5.0+ | 1.3.2+ |
|---|---|---|---|---|
| ||||
Usage
[display-type-value]
Values
| inherit | Inherit the value from the parent element. |
| inline | Display the element as one or more inline boxes. |
| block | Display the element as a block box. |
| inline-block | Display the element as an inline block box. |
| list-item | Display the element as a block box and inline list item box. |
| run-in | Display an element as a block or inline box, depending on the context. |
| compact | Display an element as a block or inline box, depending on the context. |
| marker | Specifies that generated content before or after a box is a marker. |
| inline-table | Specifies that the element should be treated like a table element. |
| table-row-group | Specifies that the element should be treated like a table row group. |
| table-header-group | Specifies that the element should be treated like a table header group. |
| table-footer-group | Specifies that the element should be treated like a table footer group. |
| table-row | Specifies that the element should be treated like a table row. |
| table-column-group | Specifies that the element should be treated like a table column group. |
| table-column | Specifies that the element should be treated like a table column. |
| table-cell | Specifies that the element should be treated like a table cell. |
| table-caption | Specifies that the element should be treated like a table caption. |
| table | Specifies that the element should be treated like a table. |
| none | Specifies that the element should generate no boxes. |
Example
For a demonstration of the display attribute and its values, see the demo page on quirksmode:
http://www.quirksmode.org/css/display.html
Availability
W3C CSS2
