listStyleImage Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:listStyleImage


The listStyleImage property sets or gets an image as the list-item marker.

Property Values

Value Description
noneNo image is used. Default
url Specifies the path to the image
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Technical Details

Item Value
Default Value: none
Return Value: A String, representing the location path of the image
CSS VersionCSS1

Specify an image as the list-item marker in a list:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<ul id="myList" style="list-style-image:url('');">
</ul>/*from  www  .j  ava2s. com*/

<button type="button" onclick="myFunction()">Test</button>

function myFunction() {
    document.getElementById("myList").style.listStyleImage = '';


Related Tutorials