The list-style-position property controls whether list markers appear inside or outside the list item content box. It affects how bullets, numbers, and wrapped text align.
01
Marker Place
Inside or outside.
02
outside
Default value.
03
inside
Marker in content.
04
Text Wrap
Multi-line lists.
05
ul & ol
Both list types.
06
Inherited
Set on parent.
Fundamentals
Introduction
The list-style-position property in CSS is used to specify the position of the list-item marker (such as a bullet or number) in relation to the list item’s content. It primarily applies to <ul> (unordered lists), <ol> (ordered lists), and <li> (list items).
By adjusting this property, you can control whether the marker is placed inside or outside the list item’s content box, allowing for more flexible styling of lists.
Definition and Usage
Apply list-style-position on ul, ol, or individual li elements. For most content lists with wrapping text, outside is the better default. Use inside when you want markers to sit flush with the content edge.
💡
Beginner Tip
The biggest visual difference appears on multi-line list items. Resize a narrow list to see how wrapped lines behave with inside vs outside.
Foundation
📝 Syntax
The syntax for the list-style-position property is as follows:
syntax.css
selector{list-style-position:value;}
The value can be either inside or outside.
Basic Example
list-style-position.css
ul.inside-list{list-style-position:inside;}
Syntax Rules
Only two keyword values are valid: inside and outside.
The property is inherited by list items.
Works with bullets, numbers, and image markers.
Often combined with list-style-type or the list-style shorthand.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
outside
Applies to
List items (display: list-item)
Inherited
Yes
Animatable
No
Common use
Multi-line lists, compact layouts, and custom marker alignment
Reference
💎 Property Values
Value
Example
Meaning
outside
list-style-position: outside;
Marker sits outside the content box; wrapped text aligns under the text start (default)
inside
list-style-position: inside;
Marker sits inside the content box; wrapped text aligns under the marker
inherit
list-style-position: inherit;
Inherits the value from the parent element
outsideinside
Default
🎯 Default Value
The default value of the list-style-position property is outside. This means the marker is placed outside the list item’s content box by default.
Preview
👀 Live Preview
Compare default outside markers with inside markers:
outside (default)
First item
Second item with longer text that wraps to show alignment behavior
inside
First item
Second item with longer text that wraps to show alignment behavior
Hands-On
Examples Gallery
Compare outside and inside on unordered lists, see wrapping behavior, style ordered lists, and combine with the list-style shorthand.
🔢 Inside vs Outside
Start with the reference example — one list uses the default outside value, the second uses inside.
Example 1 — Outside and Inside Lists
Demonstrate list-style-position with an unordered list using both values.
The shorthand sets both the square marker type and inside position in one declaration. See the list-style page for the full shorthand syntax.
A11y
♿ Accessibility
Keep semantic list markup — Marker position is visual; use real ul and ol elements.
Prefer outside for long content — Wrapped text is easier to scan when lines hang under the text start.
Do not hide meaning in marker styling alone — Important information belongs in the list item text.
Screen readers ignore marker position — They still announce list length and item content correctly.
Maintain enough spacing — Inside markers can feel cramped on dense multi-line items.
🧠 How list-style-position Works
1
Browser draws a list marker
A bullet, number, or image marker is generated for each list item.
Marker
2
Position chooses the box edge
outside places the marker beside the content box. inside places it within the box.
CSS rule
3
Wrapped text follows the rule
Multi-line items align under the text start (outside) or under the marker (inside).
Layout
=
↔
Controlled list alignment
Lists look cleaner and more intentional in both compact and readable layouts.
Compatibility
🖥 Browser Compatibility
The list-style-position property is widely supported across all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. This broad compatibility makes it a reliable choice for styling list markers in web projects.
✓ Universal · All browsers
List marker positioning everywhere
list-style-position is a core CSS property supported in all major browsers without polyfills.
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-position property99% supported
Bottom line: Safe to use everywhere. Test multi-line lists in your layout to choose the best marker position.
Wrap Up
🎉 Conclusion
The list-style-position property offers a simple yet powerful way to control the positioning of list-item markers. Whether you want to place markers inside or outside the list item’s content box, this property provides the flexibility to style lists according to your design needs.
Experiment with different positions to achieve the desired look for your lists. For readable content, outside is usually best; for compact layouts, try inside.