CSS list-style
property specifies the maker type, position, and image for ordered and unordered list items in a single declaration.
It is a shorthand for the following list properties:
Try out the example below to check how it works:
Example:
ul{ list-style: square outside url(images/thumb.png); }
Note: If any of the three values is missing, its default value is used.
CSS Syntax
The list-style
property has the below syntax:
list-style: list-style-type list-style-position list-style-image|initial|inherit;
Property Values
The list-style
property accepts the following values:
list-style-type | Specifies the type of marker for list items. |
list-style-position | Specifies the position of the list-items marker. |
list-style-image | Sets an image as the list items marker. |
initial | Sets the list-style property to its default value. |
inherit | Inherits the list-style property from its parent element. |
General Info
Default Value | disc outside none |
Inherited | Yes |
JavaScript Usage | element.style.listStyle = “square outside url(images/thumb.png)”; |