Bootstrap list image

CSS list-style-image Property

Previous Complete CSS Reference Next

Example

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

ul {
list-style-image: url['sqpurple.gif'];
}
Try it Yourself »

Definition and Usage

The list-style-image property replaces the list-item marker with an image.

Note: Always specify the list-style-type property in addition. This property is used if the image for some reason is unavailable.

Show demo

Default value: Inherited: Animatable: Version: JavaScript syntax:
none
yes
no. Read about animatable
CSS1
object.style.listStyleImage="url['smiley.gif']" Try it

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
list-style-image 1.0 4.0 1.0 1.0 7.0

CSS Syntax

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

Property Values

Value Description Demo
none No image will be displayed. Instead, the list-style-type property will define what type of list marker will be rendered. This is default Demo
url The path to the image to be used as a list-item marker Demo
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Related Pages

CSS tutorial: CSS List

CSS reference: list-style property

HTML DOM reference: listStyleImage property


Previous Complete CSS Reference Next

Video liên quan

Chủ Đề