Gets or sets a value that indicates whether and how the object is rendered.
Integer value = object.put_display( v);Integer value = object.get_display(* sDisplay);
Object is rendered as a block element.
Default. Object is rendered as an inline element sized by the dimensions of the content.
Starting in Internet Explorer 6. Object is rendered as a block element, and a list-item marker is added.
Object is rendered as a block element, and a list-item marker is added.
Object is not rendered.
Object is rendered as thead. Table header is always displayed before all other rows and row groups, and after any top captions. The header is displayed on each document spanned by a table.
Object is rendered as tfoot. Table footer is always displayed after all other rows and row groups, and before any bottom captions. The footer is displayed on each document spanned by a table.
Object is rendered inline, but the contents of the object are rendered as a block element. Adjacent inline elements are rendered on the same line, space permitting.
Internet Explorer 8. Object is rendered as table.
Internet Explorer 8. Object is rendered as table within an
Internet Explorer 8. Object is rendered as tr.
Internet Explorer 8. Object is rendered as tBody. Table body is always displayed after
table-header-group objects and before
Internet Explorer 8. Object is rendered as col.
Internet Explorer 8. Object is rendered as colGroup.
Internet Explorer 8. Object is rendered as caption.
Internet Explorer 8. If the
run-in box contains a
block element, object is rendered as a block. If not, and the following sibling is a
block (which is neither floating nor absolutely positioned), object is rendered as the first
inline-block of the sibling. Otherwise, same as
Internet Explorer 8. Specifies that an element defines a ruby structure. This and the following values are from the CSS3 Ruby Module. This value only applies to the supported ruby elements, rt and ruby.
Internet Explorer 10. Specifies a block-level flexible box ("flexbox") container. For more information on flexbox containers, see Flexible Box ("Flexbox") Layout.
Internet Explorer 10. Specifies an inline-level flexible box ("flexbox") container. For more information on flexbox containers, see Flexible Box ("Flexbox") Layout.
Internet Explorer 10. Specifies a Grid element. For more information on grid alignment, see Grid Alignment.
inline | block | list-item | run-in | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | flex | inline-flex | -ms-grid | -ms-inline-grid | none
|Applies To||All elements|
All visible HTML objects are block or inline. For example, a div object is a block element, and a span object is an inline element. Block elements typically start a new line and can contain other block elements and inline elements. Inline elements do not typically start a new line and can contain other inline elements or data. Changing the values for the IHTMLCurrentStyle::display property affects the layout of the surrounding content by:
- Adding a new line after the element with the value block.
- Removing a line from the element with the value inline.
- Hiding the data for the element with the value none.
In contrast to the IHTMLCurrentStyle::visibility property, IHTMLCurrentStyle::display:none reserves no space for the object on the screen.
In Microsoft Internet Explorer 4.0, the block, inline, and list-item values are not supported explicitly, but do render the element.
The block and inline values are supported explicitly as of Microsoft Internet Explorer 5.
In Microsoft Internet Explorer 5.5 and earlier, the default value of this property for li elements is block.
The inline-block value is supported starting with Internet Explorer 5.5. You can use this value to give an object a layout without specifying the object's height or width.
Starting with Internet Explorer 8, the
table display styles allow elements to closely parallel the visual layout of a table. The Cascading Style Sheets (CSS) table display model does not require explicit elements to correspond with the HTML tags. For example, an element styled as IHTMLCurrentStyle::display does not need to be contained within a block that is styled IHTMLCurrentStyle::display to be styled correctly. Implicit table elements are created as necessary in an attempt to make the document valid. Contrast this behavior to the traditional HTML table model, where table elements are implicitly closed early to avoid unexpected nesting.
As of Internet Explorer for Windows Phone 8.1 Update, Internet Explorer for Windows Phone supports IHTMLCurrentStyle::display:"-webkit-box" as an alias for IHTMLCurrentStyle::display:flex and IHTMLCurrentStyle::display:"-webkit-inline-box" as an alias for IHTMLCurrentStyle::display:inline-flex.
When using IHTMLCurrentStyle::display:flex or IHTMLCurrentStyle::display:"-webkit-box", the IHTMLStyle5::maxWidth of flex items is clamped to the available space inside the flex container.
This example shows the effect of changing the values for the IHTMLCurrentStyle::display property between inline, block, and none.
<span id=oSpan> This is a span </span> in a sentence. <p> <input type="button" value="Block" onclick="oSpan.style.display='block'"> :
This example uses function calls to hide and show table rows and cells.
Minimum supported client
Minimum supported server
Windows Server 2003