English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS Reference Manual

CSS @rules (RULES)

Complete List of CSS Properties

CSS list-style Attribute Usage and Examples

list-style CSS Attribute DefinitionList Itemdisplay style. It is used to set various list properties (i.e.,list-style-type,list-style-positionas well aslist-style-imageAbbreviated attribute of ()

The following table provides usage instructions and version history of this attribute, as well as its usage syntax in JavaScript scripts.

Default Value:View All Properties
Applies To:List Item
Inheritance:Yes
Animatable:No.See Also Animation Attributes.
Version:CSS 1,2,3
JavaScript Syntax:object.style.listStyle="decimal inside"

list-The syntax of style usage

The syntax of this attribute is as follows:

list-style: [ list-style-type list-style-position list-style-image ] | initial | inherit

The following examples demonstrate how to use list-style Attribute

  ul {
   list-style: circle inside;
  }
  ol {
   list-style: upper-latin outside;
  }
Test See‹/›

Attribute Value

The following table describes the value of this attribute.

ValueDescription
list-style-typeSpecify the style of the list item marker.
list-style-positionSpecify the position of the list item marker.
list-style-imageSpecify the image used as the list item marker.
initialSet this attribute to its default value.
inheritIf specified, the associated element adopts its parent element's list.-The value of the style attribute.

Browser Compatibility

list-The compatibility of the style attribute across browsers is shown in the following table; the numbers represent the minimum version of the browser that supports this attribute; all mainstream browsers support this attribute.

  • Firefox 1+

  • Google Chrome1+

  • Internet Explorer 4+

  • Apple Safari 1+

  • Opera 7+

Read More

Please refer to the following tutorials:HTML List,CSS List.

Related Attributes:list-style-image,list-style-position,list-style-type.