English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS Reference Manual

CSS @rules (RULES)

Comprehensive CSS Properties

CSS list-style-Usage and examples of the image attribute

list-style-The image CSS attribute specifies an image as the list item marker symbol.

The following table provides usage instructions and version history of this attribute, as well as the syntax of using this attribute in JavaScript scripts.

Default value:normal
Applies to:List item
Inheritance:Yes
Can be animated:No.Please see Animation attributes.
Version:CSS 1,2,3
JavaScript syntax:object.style.listStyleImage="url('images/arrow.png')

Tip:Thelist-styleShorthand CSS properties are often more convenient and the preferred method for setting list style properties.

Syntax for using list style images

The syntax of this attribute is as follows:

list-style-image: url | none | initial | inherit

The following example demonstrates how to use list-style-image attribute.

  ul {
   list-style-image: url("images/arrow.png");
  }
Test and see‹/›

Attribute value

The following table describes the value of this attribute.

ValueDescription
urlThe position of the image used as the list item marker.
noneNo marker image will be displayed. Instead, thelist-style-typeThe attribute specifies which type of list marker will be displayed (if any). This is the default value.
obliqueMark the font as oblique.
initialSet this property to its default value.
inheritIf specified, the associated elements will use the parent element's list-style-The value of the image attribute.

Browser compatibility

list-style-Browser compatibility of the image attribute, the numbers in the following table represent the minimum version number of the browser that supports this attribute; all mainstream browsers support this attribute.

  • Firefox 1+

  • Google Chrome1+

  • Internet Explorer 4+

  • Apple Safari 1+

  • Opera 7+

Further reading

Please refer to the following tutorial:HTML list,CSS list.

Related properties:list-style,list-style-position,list-style-type.