CSS list-style-image
property is used to set an image as list-items marker.
By default, the list-items marker is a bullet(•). But, we can replace it with any custom image we want. See the example below:
Example:
ul{ list-style-image: url('images/thumb.png'); }
CSS Syntax
The list-style-image
property has the following syntax:
list-style-image: none|url(source)|initial|inherit;
Property Values
The list-style-image
property accepts the following values:
none | No image is used as list items marker. This is the default value. |
url(source) | Sets the specified image as the list-items marker. The location of the image is provided using the inbuilt url() function. |
initial | Sets the list-style-image property to its default value(none). |
inherit | Inherits the list-style-image property from the parent element. |
General Info
Default Value | none |
Inherited | Yes |
JavaScript Usage | element.style.listStyleImage = “url(‘images/thumb.png’)” |