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

CSS list-style property

CSS list-style property

Example

Specify all list properties in one declaration:

ul

{

list-style:

square

url

("

sqpurple

.

gif

")

;

}

Try it »


Property definition and usage

The list-style shorthand property sets all list properties in a single declaration.

Properties that can be set (in order): list-style-type, list-style-position, list-style-image.

You can omit one of the values, for example "list-style:circle inside;" is allowed. Omitted properties use their default values.

Default value: disc outside none
Inherited: yes
Version: CSS1
JavaScript syntax: object.style.listStyle="decimal inside"

Browser support

The numbers in the table indicate the first browser version that supports this property.

property
list-style 1.0 4.0 1.0 1.0 7.0

Attribute values

Value Description
list-style-type Sets the type of the list item marker. See:list-style-type Possible values.
list-style-position Sets where the list item marker is placed. See:list-style-position Possible values.
list-style-image Uses an image to replace the list item marker. See:list-style-image Possible values.
initial Sets this property to its default value. See:initial Possible values.
inherit Specifies that the list-style property should be inherited from the parent element. See:inherit Possible values.

Related Articles

CSS Tutorial: CSS Lists