CSS

🎯 CSS list-style-image Property

The CSS list-style-image property allows you to replace the default list marker with a custom image. It is used in <ul> and <ol> elements to customize bullet points visually.

Instead of standard bullets or numbers, you can use icons, logos, or any image as list markers.

🔹 Values of list-style-image

1️⃣ none (Default)

Removes any custom image and displays the default list marker (bullet or number).

CSS

ul {
  list-style-image: none;
}
                

2️⃣ url() (Custom Image)

Defines the image path used as the list marker. Each list item will display this image instead of a bullet.

CSS

ul {
  list-style-image: url("images/star.png");
}
                

✔ Example result: Each list item uses a star icon as a bullet.

3️⃣ initial

Resets the property to its default value. The browser will use standard list markers.

CSS

list-style-image: initial;
                

4️⃣ inherit

The element inherits the list-style-image value from its parent element.

CSS

list-style-image: inherit;
                

🧪 Practical Example

You can use custom icons to make menus or lists more visually appealing:

CSS

ul.menu {
  list-style-image: url("icons/arrow.png");
}
                

In this example, each list item will display an arrow icon instead of a bullet point.

  • 🧠 Summary

  • list-style-image replaces default bullets with images
  • none → uses default marker
  • url() → uses custom image
  • initial → resets to default
  • inherit → inherits from parent