Change the style of a list:
The listStyle property sets or returns up to three separate list properties, in a shorthand form.
With this property, you can set/return one or more of the following (in any order):
The listStyle property is supported in all major browsers.
Return the listStyle property:
Set the listStyle property:
Parameter | Description |
---|---|
type | Defines the list-item marker type |
position | Positions the list-item marker |
image | Defines an image to be used as the list-item marker |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | disc outside none |
---|---|
Return Value: | A String, representing the style of a list |
CSS Version | CSS1 |
Change the type and position of a list to "square inside":
CSS tutorial: CSS List
CSS reference: list-style property