List Marker Position Property

Last updated: 2026-09-13

list-style-position List Marker Position Property

list-style-position controls whether the list marker sits inside or outside the list item's content block. The default outside places the marker outside the content block so the first line of text aligns cleanly; inside pulls the marker into the content block so text wraps around it. It affects the list's flow and indentation.

Category
Initial Valueoutside
InheritedNo
Applies To
Animation Type
CSS VersionCSS1
StatusStandard

📝 Syntax

list-style-position: outside | inside;

⚙️ Values

ValueTypeDescription
outside | insideKeywordMarker position

▶ Example

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

🌐 Browser Support

Browser ChromeChrome EdgeEdge FirefoxFirefox SafariSafari OperaOpera
list-style-position v1 v12 v1 v1 v1
Supported in all major browsers
Tip: outside is the default and keeps subsequent lines aligned with the first; inside suits short text and makes marker and text visually compact.

❓ FAQ

QHow do outside and inside affect list layout?
Aoutside (the default): the marker sits outside the li content block, so the text block is left-aligned as a whole, all lines line up, and the marker keeps its standard gap from the text. inside: the marker sits inside the content block, so the first line is pushed in and subsequent lines align under the marker. outside fits multi-line long text; inside looks more compact.
QWhy does text look neater with outside?
ABecause in outside mode the marker takes no width from the content block, the text block is a clean rectangle whose left edges align on every line. In inside mode the first line is indented by the marker, so the first line no longer aligns with the following lines. For multi-line lists, keep the default outside so every line aligns.
QHow do I vertically center list markers with the text?
Alist-style-position cannot fine-tune marker alignment. The usual approach: list-style: none to remove the marker, li::before inserting content: "•" (or an icon), and flex with align-items: center to center the marker against the text, then control the spacing uniformly.

📚 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%

🙏 帮我们做得更好

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

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