CSS list-style-image Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Lists

What You’ll Learn

The list-style-image property lets you replace default bullets or numbers with a custom image marker. It is useful for branded lists, feature highlights, and decorative navigation.

01

Image Markers

Custom bullets.

02

url()

Image path syntax.

03

none

Default value.

04

Fallback

Uses list-style-type.

05

Inherited

Set on ul or ol.

06

Branding

Icons and logos.

Introduction

The list-style-image property in CSS allows developers to specify an image as the marker for list items. This property replaces the default bullet or number with a custom image, giving designers more control over the visual style of lists.

It is commonly used to enhance the appearance of lists in navigation menus, content sections, and other parts of a website. You can use PNG, SVG, GIF, or other image formats supported by the browser.

Definition and Usage

Apply list-style-image on ul, ol, or individual li elements. When an image is set, it takes priority over the marker from list-style-type. If the image cannot load, the browser falls back to the type marker.

💡
Beginner Tip

Keep marker images small (roughly 12–20 pixels). Large images can break list alignment and make text hard to scan.

📝 Syntax

The syntax for the list-style-image property is straightforward. It can be applied to any list item (<li>) or parent list (<ul>, <ol>):

syntax.css
selector {
  list-style-image: url(image-path);
}

Basic Example

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

Syntax Rules

  • url(image-path) specifies the path to the image file used as the list marker.
  • none removes the image and restores the normal marker behavior.
  • The property is inherited by list items.
  • Image markers cannot be resized with CSS; prepare the asset at the size you want.
  • Pair with list-style-type as a fallback when the image fails to load.

⚡ Quick Reference

QuestionAnswer
Initial valuenone
Applies toList items (display: list-item)
InheritedYes
AnimatableNo
Common useBranded bullets, icon lists, and decorative feature lists

💎 Property Values

ValueExampleMeaning
nonelist-style-image: none;No image is used; the default marker from list-style-type is displayed
url()list-style-image: url("/images/flower.png");Uses the image at the given URL as the list marker
inheritlist-style-image: inherit;Inherits the value from the parent element
none url("/images/flower.png")

🎯 Default Value

The default value of the list-style-image property is none, which means no image is used and the default list marker is displayed.

👀 Live Preview

An unordered list using a custom flower image as the marker:

  • Feature one
  • Feature two
  • Feature three

Examples Gallery

Replace default bullets with an image, add a fallback marker type, combine with the list-style shorthand, and reset markers with none.

🔢 Image Markers

Start with the reference example — replace default list markers with a custom image.

Example 1 — Custom List Marker Image

Replace the default list markers with a custom image.

list-style-image.html
<style>
  ul.custom-list {
    list-style-image: url("/images/flower.png");
  }
</style>

<ul class="custom-list">
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>

Replace the URL with the actual path to your own marker image file.

Try It Yourself

How It Works

The browser loads the image and displays it in place of the default disc bullet for each list item.

Example 2 — Image with Fallback Marker Type

Set a marker type so the list still looks correct if the image fails to load.

list-style-image-fallback.css
ul.features {
  list-style-type: square;
  list-style-image: url("/images/flower.png");
}
Try It Yourself

How It Works

The image marker is used when available. If the image URL is broken, the square marker from list-style-type appears instead.

📈 Shorthand & Reset

Combine image markers with the list-style shorthand or remove them with none.

Example 3 — list-style Shorthand with Image

Set type, position, and image together using the list-style shorthand.

list-style-shorthand.css
ul.branded {
  list-style: square outside url("/images/flower.png");
}
Try It Yourself

How It Works

The shorthand sets fallback type and position while applying the custom image marker. See the list-style page for full shorthand details.

Example 4 — Reset with list-style-image: none

Remove a custom image marker and return to the normal bullet style.

list-style-image-none.css
ul.plain-list {
  list-style-image: none;
  list-style-type: disc;
}
Try It Yourself

How It Works

list-style-image: none clears the image marker so the list uses the normal disc bullet again.

♿ Accessibility

  • Decorative markers should not carry meaning alone — Important information belongs in the list item text.
  • Keep semantic list markup — Use real ul and ol elements even with custom images.
  • Provide alt text indirectly through content — CSS background and list marker images do not accept alt attributes.
  • Ensure markers remain visible — Low-contrast icons can be hard to see on some backgrounds.
  • Test without images — Verify fallback markers still make lists scannable if images fail.

🧠 How list-style-image Works

1

You provide an image URL

Set list-style-image: url(...) on a list or list item.

CSS rule
2

Browser loads the marker

If the image loads successfully, it replaces the default bullet or number.

Rendering
3

Fallback type remains available

If the image fails, list-style-type supplies a standard marker instead.

Resilience
=

Branded list markers

Lists gain custom visual identity while keeping semantic HTML structure.

🖥 Browser Compatibility

The list-style-image property is well-supported across all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. Test your marker images in the browsers your audience uses to confirm appearance and alignment.

Universal · All browsers

Custom list markers everywhere

list-style-image is widely supported and safe for production use with proper fallbacks.

99% Global browser support
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Legacy & Chromium
Full support
Opera All versions · Modern & legacy
Full support
list-style-image property 99% supported

Bottom line: Safe to use with fallback marker types. For modern flexible icons, some teams prefer custom CSS markers instead.

🎉 Conclusion

The list-style-image property offers a simple way to customize the appearance of lists on your website by using custom images as list markers. This can enhance the visual appeal and brand identity of your site.

Experiment with different images and styles to see how this property can add a unique touch to your content. Keep marker assets small, provide a fallback type, and test in multiple browsers for the best results.

💡 Best Practices

✅ Do

  • Use small, optimized marker images
  • Set list-style-type as a fallback
  • Test marker alignment on multi-line items
  • Keep semantic ul and ol markup
  • Prefer SVG or PNG for crisp icons

❌ Don’t

  • Use large images that break list layout
  • Rely on marker images to convey critical meaning
  • Forget to test broken image URLs
  • Assume marker size can be changed with CSS
  • Replace accessible text lists with image-only markers

Key Takeaways

Knowledge Unlocked

Five things to remember about list-style-image

Use these points when styling list markers with images.

5
Core concepts
none 02

Default none

No image.

Default
url 03

url() path

Image source.

Values
sq 04

Fallback type

Backup marker.

Pattern
05

Semantic

Keep real lists.

A11y

❓ Frequently Asked Questions

list-style-image replaces the default bullet or number with a custom image used as the list item marker.
The default value is none, which means no image is used and the normal list marker from list-style-type is displayed.
The browser falls back to the list-style-type marker, such as disc or decimal, if one is set.
Yes. You can use PNG, GIF, SVG, or other image formats supported by the browser through url().
Yes. list-style-image is inherited, so setting it on ul or ol affects nested list items unless they override it.

Practice in the Live Editor

Open the HTML editor, apply list-style-image to a list, and preview custom markers instantly.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful