Style listStyleImage Property

Example

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

document.getElementById("myList").style.listStyleImage = "url('sqorange.gif')";
Try it Yourself »

Description

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


Browser Support

Property
listStyleImage Yes Yes Yes Yes Yes

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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.