Style listStyle Property
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:
- list-style-type
- list-style-position
- list-style-image
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





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:
- Coffee
- Tea
- Water
- Soda
Try it »
The Style object