CSS list-style property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerFully supports
EdgeFully supports
OperaFully supports
Description
CSS list style is a shorthand property of list-style-type, list-style-position, and list-style-image. We'll learn how to specify the type of list item markers, the position, and the use of image as the list item markers.
Syntax
list-style : list-style-type list-style-position list-style-image
Property values
list-style-type
decimal-leading-zero
-
decimal number as item markers with leading zero.
- Try it
list-style-type: decimal-leading-zero;
list-style-position
outside Default
-
In this case, the markers don't merge themselves with the list item content.
- Try it
list-style-position: outside; inside
-
In this case, the markers become a part of the list item content.
- Try it
list-style-position: inside;
list-style-image
noneDefault
-
no image is used as the content of list item markers. In this case, list-style-type defines the type of list item markers.
- Try it
list-style-image: none; url(image-address)
-
It defines the address of the image that is used as the content of list item markers.
- Try it
list-style-image: url('img/web4college.png');
Applicable to
It applies to list items.