Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS list-style property


May 05, 2021 CSS Reference Manual


Table of contents


CSS list-style property


Specify all list properties in one declaration:

ul
{
list-style:square url("sqpurple.gif");
}

Try it out . . .

Description of property definition and use

List-style short-case properties set all list properties in one declaration.

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

You can not set one of these values, such as "list-style:circle inside;" I t is also allowed. Properties that are not set use their default values.

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


Browser support

The numbers in the table support the first browser version number of the property.

Attributes
list-style 1.0 4.0 1.0 1.0 7.0

The property value

Value Describe
list-style-type Set the type of list item tag. See also: Possible values in list-style-type.
list-style-position Set where to place list item tags. See also: Possible values in list-style-position.
list-style-image Use images to replace tags for list items. See also: Possible values in list-style-image.
initial Set this property to the default. See: Possible values in initial.
inherit Specifies that the value of the list-style property should be inherited from the parent element. See also: Possible values in inherit.


Related articles

CSS tutorial: CSS list