back

Display

Display is used to specify the type of box a HTML element has.
There are many options available for this:
(1) None, an element with this attribute will not be shown at all.
(2) Inline, an inline element (such as a <span>) will only take up as much width as it needs.
(3) Block, a block element like a <p> or a <div> will take up as much space as is available.
(4) Inline-block, this element displays takes up as much space it needs like an inline element, but the elements content is formatted like a block element.
(5) Inherit, the value will be inherited from its parent element.
(6) Table Values, the element can be displayed as one of the table elements, the options are: table, table-cell, table-column, table-colgroup, table-header-group, table-row-group, table-footer-group, table-row, and table-caption.
(7) List-item, this displayed the element like a <li> list.

Example