Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS list-style-position property

CSS list-style-position property

Example

Specify the position of the list item marker:

ul

{

list-style-position:

inside

;

}

Try it »


Property definition and usage

The list-style-position property indicates how the list item marker is drawn relative to the item's content.

Online example »

Default value: outside
Inherited: yes
Version: CSS1
JavaScript syntax: object.style.listStylePosition="inside"

Browser support

The numbers in the table indicate the first browser version that supports this property.

property
list-style-position 1.0 4.0 1.0 1.0 3.5

Attribute values

Value Description
inside The list item marker is placed inside the text, and the wrapped text is aligned with the marker.
outside Default. Keeps the marker on the left side of the text. The list item marker is placed outside the text, and the wrapped text is not aligned with the marker.
inherit Specifies that the list-style-position property should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Lists

CSS Reference Manual: list-style property