Style listStyleImage attribute
- Previous Page listStyle
- Next Page listStylePosition
- Go Up One Level HTML DOM Style Object
Definition and usage
listStyleImage
Set or return the image as the marker for list items.
See also:
CSS Tutorial:CSS List
CSS Reference Manual:list-style-image attribute
HTML DOM Reference Manual:listStyle attribute
Example
Example 1
Define the image as the marker for list items in the list:
document.getElementById("myList").style.listStyleImage = "url('sqorange.gif')";
Example 2
Return the list-style-image attribute value:
alert(document.getElementById("myList").style.listStyleImage);
Syntax
Return the listStyleImage attribute:
object.style.listStyleImage
Set the listStyleImage attribute:
object.style.listStyleImage = "none|url|initial|inherit"
Attribute value
Value | Description |
---|---|
none | No image will be displayed. Default. |
url | Specify the path of the image. |
initial | Set this attribute to its default value. See initial. |
inherit | Inherit this attribute from its parent element. See inherit. |
Technical details
Default value: | none |
---|---|
Return value: | A string representing the location path of the image. |
CSS version: | CSS1 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Previous Page listStyle
- Next Page listStylePosition
- Go Up One Level HTML DOM Style Object