The list-style property is a shorthand for controlling list markers. It lets you customize bullets, numbers, marker position, and optional marker images on <ul> and <ol> lists.
01
Shorthand
Three sub-properties.
02
Markers
Bullets and numbers.
03
Position
inside or outside.
04
Images
Custom markers.
05
none
Remove bullets.
06
Inherited
Set on ul or ol.
Fundamentals
Introduction
The list-style property in CSS is a shorthand property for setting all the list properties in one declaration. It can be used to control the appearance of list items, including the type of bullet or numbering, the position of the marker, and an image to use as a marker.
This property is commonly used with unordered (<ul>) and ordered (<ol>) lists to enhance their presentation. You will also use it when building navigation menus, feature lists, and step-by-step instructions.
Definition and Usage
Apply list-style on ul, ol, or individual li elements. The shorthand accepts up to three values in any order: list-style-type, list-style-position, and list-style-image.
💡
Beginner Tip
If you only need to change the bullet shape, write something simple like list-style: square;. You do not have to set all three parts every time.
Foundation
📝 Syntax
The syntax for the list-style property allows you to set three sub-properties at once:
list-style-type — Specifies the type of list item marker (disc, square, decimal, etc.).
list-style-position — Specifies whether the marker sits inside or outside the list item.
list-style-image — Specifies an image URL to use as the list item marker.
Basic Example
list-style.css
ul{list-style:squareinside;}
Syntax Rules
Any omitted value resets to its initial default.
If a valid image is supplied, it takes priority over the marker type.
The property is inherited by list items.
Use none as the type to remove markers entirely.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
disc outside none
Applies to
List items (display: list-item)
Inherited
Yes
Animatable
No
Common use
Custom bullets, numbered steps, and unstyled nav lists
Reference
💎 Property Values
list-style-type
Value
Description
disc
Filled circle (default for unordered lists)
circle
Hollow circle
square
Filled square
decimal
Numbers (1, 2, 3, …)
lower-alpha
Lowercase alphabet (a, b, c, …)
upper-alpha
Uppercase alphabet (A, B, C, …)
none
No marker
list-style-position
Value
Description
outside
Marker is outside the list item (default)
inside
Marker is inside the list item content box
list-style-image
Value
Description
url(path/to/image)
Uses an image as the list item marker
none
No image is used (default)
disc outside nonesquare insidedecimalnone
Default
🎯 Default Value
The default value for the list-style property is disc outside none. This means list items use a disc marker, the marker sits outside the list item, and no custom image is used.
Preview
👀 Live Preview
An unordered list with list-style: square inside:
square inside
First item
Second item with longer text that wraps to show inside marker behavior
Third item
Hands-On
Examples Gallery
Create custom unordered lists, style ordered lists, compare inside vs outside markers, and remove bullets for navigation menus.
🔢 Custom Unordered Lists
Start with the reference example — a list with square markers positioned inside each item.
list-style: none hides markers while keeping semantic list markup. Pair it with flexbox for horizontal nav layouts.
A11y
♿ Accessibility
Keep semantic lists — Use real ul and ol elements instead of divs with manual bullets.
Do not remove markers without reason — If content is a true list, markers help users scan items.
Ensure sufficient contrast — Custom marker colors should remain visible against the background.
Screen readers still announce list length — Removing bullets visually does not remove list semantics.
Nested lists need clear hierarchy — Use proper nesting and consistent marker styles at each level.
🧠 How list-style Works
1
You style a list element
Apply list-style on ul, ol, or li with type, position, and optional image values.
CSS rule
2
Browser picks a marker
A bullet, number, letter, custom image, or no marker is chosen based on your shorthand values.
Rendering
3
Position controls alignment
inside or outside determines where the marker sits relative to list item text.
Layout
=
•
Styled lists
Content lists, steps, and navigation can match your site design while staying semantic.
Compatibility
🖥 Browser Compatibility
The list-style property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. It is widely used and has broad compatibility, making it a reliable choice for styling lists.
✓ Universal · All browsers
List styling everywhere
list-style is a core CSS property supported since early browser versions. Safe for any web project.
99%Global browser support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Legacy & Chromium
Full support
OperaAll versions · Modern & legacy
Full support
list-style property99% supported
Bottom line: Safe to use everywhere. For custom image markers, see the dedicated list-style-image property page.
Wrap Up
🎉 Conclusion
The list-style property in CSS provides a simple way to customize the appearance of list items. By adjusting the type, position, and image of the list markers, you can create visually appealing lists that fit the design of your website.
Experiment with different values and combinations to achieve the desired look for your lists. Start with marker types like square or decimal, then explore position and image options as your designs grow more advanced.
Learn the longhand properties when you need fine control
❌ Don’t
Replace lists with divs just to avoid default bullets
Use hard-to-see marker colors on busy backgrounds
Mix too many marker styles on one page
Forget padding when removing default list indentation
Depend on broken image URLs for list markers
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about list-style
Use these points when styling HTML lists.
5
Core concepts
•01
Shorthand
Type, position, image.
Purpose
disc02
Default disc
outside none.
Default
1.03
Marker types
Bullets and numbers.
Values
in04
Position
inside or outside.
Pattern
♿05
Semantic
Keep real lists.
A11y
❓ Frequently Asked Questions
list-style is a shorthand that sets list-style-type, list-style-position, and list-style-image in one declaration. It controls bullets, numbers, marker position, and optional marker images.
The default is disc outside none — a filled circle marker outside the list item with no custom image.
outside places the marker in the margin area beside the text. inside places the marker inside the list item content box, so text wraps under the marker.
Yes. Use list-style: none or list-style-type: none to hide markers. This is common for navigation menus built with ul or ol.
Yes. list-style is inherited, so setting it on ul or ol affects list items unless they override it.