This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
The list-item keyword causes the element to generate a ::marker pseudo-element with the content specified by its list-style properties (for example a bullet point) together with a principal box of the specified type for its own contents.
A single value of list-item will cause the element to behave like a list item. This can be used together with list-style-type and list-style-position.
list-item can also be combined with any <display-outside> keyword and the flow or flow-root <display-inside> keywords.
Note: In browsers that support the two-value syntax, if no inner value is specified it will default to flow. If no outer value is specified, the principal box will have an outer display type of block.
<display-listitem> =
<display-outside>? &&
[ flow | flow-root ]? &&
list-item
<display-outside> =
block |
inline |
run-in
<div class="fake-list">I will display as a list item</div>
.fake-list {
display: list-item;
list-style-position: inside;
}
| Specification |
|---|
| CSS Display Module Level 3> # typedef-display-listitem> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
display-listitem |
1 | 12 | 1 | 7 | 1 | 18 | 4 | 14 | 1 | 1.0 | 4.4 | 1 |
legend-support |
71 | 79 | 64 | 58 | No | 71 | 64 | 50 | No | 10.0 | 71 | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/display-listitem