B.60. list-style-image

This property lets you assign an image to be displayed, instead of a standard marker for list items. You can set this property for individual list items (li) if needed; however, the recommended method for specifying an image for all elements in a list is to apply the property to the list element (ol, ul, etc.) and let the list items inherit it.

You should usually specify a list-style-type value with your list-style-image; the browser will use the list-style-type as a fallback if the image fails to load.

Be aware of the fact that this property is inherited by descendant elements, including nested lists. See the discussion in the example for the list-style property to learn how to avoid this pitfall.

Inherited: Yes

See ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.