property

List style position — CSS reference

Determines whether the marker box participates in the list item content as an initial inline box (inside) or sits outside the principal box (outside). A wrapped second line may therefore align differently. It does not change HTML numbering.

Formal Syntax & Structure

css syntaxcss
list-style-position: inside;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>list-style-position</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}body{font:16px/1.5 sans-serif}#a{margin:16px;padding:8px 8px 8px 80px;background:white}li{padding-left:4px}#a{list-style-position:inside}#b{list-style-position:outside}ol{padding-left:70px;width:180px}li{padding:0}span{display:inline-block;width:10px;height:10px}</style><body><ol id="a"><li><span></span>ONE</li></ol><ol id="b"><li><span></span>TWO</li></ol></body></html>
CSS Reference