List Marker Image Property

Last updated: 2026-09-13

list-style-image List Marker Image Property

list-style-image replaces the default marker (dot, number, etc.) with a custom image on list items. The default value none means no image is used. It is often used to give lists branded small icons or decorative arrows for a richer look.

Category
Initial Valuenone
InheritedNo
Applies To
Animation Type
CSS VersionCSS1
StatusStandard

📝 Syntax

list-style-image: none | <image>;

⚙️ Values

ValueTypeDescription
noneKeywordNo image
<image>TypeCustom marker image

▶ Example

Edit the code below and see the live result in the playground:

🌐 Browser Support

Browser ChromeChrome EdgeEdge FirefoxFirefox SafariSafari OperaOpera
list-style-image v1 v12 v1 v1 v1
Supported in all major browsers
Tip: list-style-image cannot control the image size; for more flexibility, use a ::before pseudo-element with background-image instead.
Warning: If the image fails to load, the marker disappears, so it is wise to also set list-style-type as a fallback.

❓ FAQ

QWhich is better, list-style-image or a ::before pseudo-element?
A::before is more flexible: it controls image size, position, spacing, and alignment, and works with icon fonts. list-style-image is simple to use but cannot scale the image or fine-tune alignment. Use ::before with background-image and background-size when you need precise control; use list-style-image for quick marker swaps.
QHow do I center the image in list-style-image?
Alist-style-image itself cannot precisely control alignment — the image is drawn at its intrinsic size. For exact centering, switch to li::before inserting content: "" with background-image and background-position: center, sizing it with background-size, and center/scale as needed.
QWhat happens when the list-style-image fails to load?
AIf the image fails to load (wrong path, unsupported format, or blocked), the marker disappears or falls back to nothing, leaving the list items 'bare'. To avoid that, keep list-style-type as a backup, e.g. list-style: disc url(bullet.png); — the disc shows when the image is unavailable.
QWhy can't I resize the list-style-image image?
ABecause the property draws the image at its intrinsic size in the marker position, and CSS offers no parameter to scale it or recolor it. Oversized or undersized images cannot adapt to the font size and layout. For size control, switch to li::before with background-image and background-size, or use an inline SVG icon and set its width and height.

📚 Related Tutorials

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏