Name

display — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

Whether the element should be rendered in the document. Although the property can be set to a variety of values, there are only two states. When set to none, the element is hidden, and surrounding content cinches up to fill the space; when set to an empty string (or any other value), the element is displayed.

Example

document.all.instructionDiv.style.display = ""

Value

Either none or an empty string ("").

Default

None.

Get Dynamic HTML: The Definitive Reference 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.