CSS list-style-position
property specifies the position of the list items marker. The position of the marker is relative to the list items.
The position of the marker can either be inside the list-items or outside the list-items. See the example below:
Example:
ul.inside{ list-style-position: inside; } ul.outside{ list-style-position: outside; }
CSS Syntax
The list-style-position
property has the following syntax:
list-style-position: outside|inside|initial|inherit;
Property Values
The list-style-position
property accepts the following values:
outside | The position of the marker is outside the list-items. |
inside | The position of the marker is inside the list-items. |
initial | Sets the list-style-position property to its default value(outside). |
inherit | Inherits the list-style-position property from the parent element. |
General Info
Default Value | outside |
Inherited | Yes |
JavaScript Usage | element.style.listStylePosition = “inside” |