document.tags.display

JavaScript 1.2+ Nav4+ Syntax

document.tags.tagName.display

Description

The display property specifies an element that is displayed when associated with the tag called tagName.

The display property can be assigned one of the following values: inline, block, list-item, or 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.174 uses the display property to create header text. block consists of a line break and resetting margins to their default values. Notice that a carriage return is automatically entered ...

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.