Style listStyleImage Property

Style Object Reference Style Object

Example

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

document.getElementById("myList").style.listStyleImage = "url('sqorange.gif')";

Try it yourself »

Definition and Usage

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The listStyleImage property is supported in all major browsers.


Syntax

Return the listStyleImage property:

object.style.listStyleImage

Set the listStyleImage property:

object.style.listStyleImage="none|url|initial|inherit"

Property Values

Value Description
none No image will be displayed. This is default
url Specifies the path to the image
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details

Default Value: none
Return Value: A String, representing the location path of the image
CSS Version CSS1

More Examples

Example

Return the list-style-image property value:

alert(document.getElementById("myList").style.listStyleImage);

Try it yourself »

Related Pages

CSS tutorial: CSS List

CSS reference: list-style-image property

HTML DOM reference: listStyle property


Style Object Reference Style Object

SHARE THIS PAGE

COLOR PICKER

colorpicker





Search w3schools.com:

Translate w3schools.com: