The list-style-position property specifies whether a list item’s marker should be inside or outside the list-item box.
The list-style-position property is applied to list items and elements for which the display is set to “list-item”. By default, this includes <li> elements. It can also be set on parent elements: <ol> or <ul>.
| Initial Value | outside |
| Applies to | List items. |
| Inherited | Yes. |
| Animatable | No. |
| Version | CSS1 |
| DOM Syntax | object.style.listStylePosition = “inside”; |
Syntax
list-style-position: inside | outside | initial | inherit;
Example of the list-style-position property with the “inside” value:
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
.inside {
list-style-position: inside;
}
li {
border: 1px solid #666;
padding: 5px;
}
</style>
</head>
<body>
<h2>List-style-position property example</h2>
<p>Here the list-style is positioned "inside".</p>
<ul class="inside">
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
</body>
</html>
Result

In the given example the list items are positioned inside the box.
Example of the list-style-position property with the “outside” value:
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
.outside {
list-style-position: outside;
}
li {
border: 1px solid #666;
padding: 5px;
margin-bottom: 15px;
}
</style>
</head>
<body>
<h2>List-style-position property example</h2>
<p>Here the list-style is positioned "outside".</p>
<ul class="outside">
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
</body>
</html>