HTML CSS examples for CSS Property:list-style-image
The list-style-image CSS property sets an image as a list-item marker.
The following table summarizes the list-style-image Property.
Item | Value |
---|---|
Default value: | normal |
Applies to: | List items |
Inherited: | Yes |
Animatable: | No. |
The syntax of the property is as follows:
list-style-image: url | none | initial | inherit
The following table describes the values of this property.
Value | Description |
---|---|
url | The location of image. |
none | No marker image will be displayed. This is default. |
oblique | Selects a font that is labeled oblique in the user agent's font database. |
initial | Sets this property to its default value. |
inherit | take the value of its parent element list-style-image property. |
The example below shows the list-style-image property.
<!DOCTYPE html> <html lang="en"> <head> <title>Example of list-style-image Property</title> <style type="text/css"> ul {<!-- www. ja va 2 s.c o m--> list-style-image: url("https://www.java2s.com/style/demo/Google-Chrome.png"); } </style> </head> <body> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </body> </html>