CSS list-style Property
Example
Specify all the list properties in one declaration:
ul
{
list-style: square inside url("sqpurple.gif");
}
Try it Yourself »
Definition and Usage
The list-style
property is a shorthand for the
following properties:
If one of the values are missing, the default value for that property will be used.
Default value: | disc outside none |
---|---|
Inherited: | yes |
Animatable: | no. Read about animatable |
Version: | CSS1 |
JavaScript syntax: | object.style.listStyle="decimal inside" Try it |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
list-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
CSS Syntax
list-style: list-style-type list-style-position list-style-image|initial|inherit;
Property Values
Value | Description | Demo |
---|---|---|
list-style-type | Specifies the type of list-item marker. Default value is "disc" | Demo ❯ |
list-style-position | Specifies where to place the list-item marker. Default value is "outside" | Demo ❯ |
list-style-image | Specifies the type of list-item marker. Default value is "none" | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Related Pages
CSS tutorial: CSS List
HTML DOM reference: listStyle property