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

HTML DOM Style listStyle Property

Style listStyle Property

Style Object Reference The Style object


Definition and Usage

The listStyle property sets or returns three separate list properties in a shorthand form.

With this property, you can set/return:

Syntax

Sets the listStyle property:

Object.style.listStyle="

type position image

"

Returns the listStyle property:

Object.style.listStyle

**Tip:** The default value of the listStyle property is "disc outside none".

Parameters Description
type Defines the type of the list item marker.
position Positions the list item marker.
image Defines an image as the list item marker.
inherit The listStyle property value is inherited from the parent element.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the listStyle 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

Changes the style of the list:

Runoob Tutorial(runoob.com)

Try it »


Style Object Reference The Style object