CSS <display-listitem> Data Type
The <display-listitem> data type is the list-item display keyword, which gives an element a list marker, optionally with an outer and inner display type.
Description
The <display-listitem> CSS data type represents the list-item keyword of the display property, optionally combined with an outer and an inner display type. An element with display: list-item behaves like an HTML li element: it generates a ::marker pseudo-element, such as a bullet or a number, and it automatically increments the built-in list-item counter used for ordered list numbering.
The full syntax is list-item plus up to two optional keywords: an outer type (block or inline) and an inner type (flow or flow-root). The defaults are block and flow, so display: list-item is the same as display: block flow list-item. display: inline list-item creates an inline element that still shows a marker.
The marker's appearance is controlled with list-style-type, list-style-position and list-style-image, and it can be styled directly with the ::marker pseudo-element.
Examples:
/* Turn any element into a list item with a bullet */
.step {
display: list-item;
list-style-type: disc;
margin-left: 1.5em;
}
/* Inline list item */
.tag {
display: inline list-item;
list-style: square inside;
}
Syntax
<display-listitem> = <display-outside>? && [ flow | flow-root ]? && list-item
Values
- list-itemRequired. The element generates a ::marker box and increments the list-item counter.
- <display-outside>Optional. block (default) or inline.
- flow | flow-rootOptional. The inner display type; defaults to flow.
Example
Browser Support
The following information will show you the current browser support for the CSS display-listitem data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.
Desktop





Tablets & Mobile





