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

HTML DOM Style listStylePosition Property

Style listStylePosition Property

Style Object Reference The Style object


Definition and Usage

The listStylePosition property sets or returns the position of the list item marker.

Syntax

Sets the listStylePosition property:

Object.style.listStylePosition="outside|inside|inherit"

Returns the listStylePosition property:

Object.style.listStylePosition

Value Description
outside Default. The list item marker is rendered before any text content. The marker is placed outside the text, and the wrapping text does not align with the marker.
inside Indents the list item marker. The marker is placed inside the text, and the wrapping text aligns with the marker.
inherit The listStylePosition property value is inherited from the parent element.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the listStylePosition property.

**Note:** IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".


Example

Example

Indents the list item marker by clicking a button:

Runoob Tutorial(runoob.com)

Try it »


Style Object Reference The Style object