document.ids.display

JavaScript 1.2+ Nav4+ Syntax

document.ids.idName.display

Description

The display property specifies an element to be displayed when associated with the ID called idName.

The display property can be assigned one of the following values: inline, block, list-item, and none.

Specifying an inline value is equivalent to using the <em> tag. The block value is the same as creating header text with the <h> tag. Using list-item is equivalent to using the <li> tag. If none is specified, the element is not displayed.

Example

Listing 7.116 uses the display property to create header text. block consists of a line break and resetting margins to their default values. Notice that in this example a carriage return is automatically ...

Get Pure JavaScript 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.