Name

display

Values:

block|inline|list-item|none

Example:

P { display: block }

IMG { display: none } (turns off all images)

Applies to:

All elements

Inherited:

No

This property defines how and if an element is displayed. A value of none turns off the display and closes up the space the element would otherwise occupy. block opens a new box that is positioned relative to adjacent boxes. list-item is similar to block except that a list-item marker is added. inline results in a new inline box on the same line as the previous content.

Get Web Design in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.