---
layout: single
property_name: display
---
Sets the display behavior of the element.
The element is completely removed, as if it wasn't in the HTML code in the first place.
The element is turned into an inline element: it behaves like simple text. Any
The element is turned into a block element: it starts on a new line, and takes up the whole width.
The element shares properties of both an inline and a block element: For example, this element has:
The element behaves like a list item:
The element behaves like a table: Its content and child elements behave like table cells.
The element behaves like a table cell: Its content and child elements behave like table cells.
The element behaves like a table row: Its content and child elements behave like table cells.
The element is turned into an flexbox container. On its own, it behaves like a block element. Its child elements will be turned into flexbox items.
The element shares properties of both an inline and a flexbox element: For example, this element has:
The element is turned into an grid container. On its own, it behaves like a block element. Its child elements will be turned into grid items.
The element shares properties of both an inline and a grid element: For example, this element has:
#display
display: none;
display: inline;
height and width applied will have no effect.display: block;
display: inline-block;
height and width values.element{
height: 3em;
width: 60px;
}
display: list-item;
<li>. The only difference with block is that a list item has a bullet point.display: table;
<table>.display: table-cell;
<td> or <th>.display: table-row;
<tr>.display: flex;
display: inline-flex;
.element{
height: 3em;
width: 120px;
}
display: grid;
display: inline-grid;
.element{
height: 3em;
width: 120px;
}