List Styling in CSS
List Styling
As we already know, there are two types of lists. One is an unordered list or ul. The other one is ordered List or ol. The CSS list properties allow us to set different list item markers. Some of the most common markers are circle, square, decimal, disc, and lower-alpha. We can do all this by list-style-type property. It has two more properties i.e, list-style-image and list-style-position.
Syntax:-
Its syntax is:-
< style >
element{
list-style: list-style-type list-style-position list-style-image| initial| inherit;
}
< /style >
Further Explanation:-
Value | Description |
---|---|
list-style-type | Specifies the type of list-item marker. |
list-style-position | Specifies where to place the list-item marker. |
list-style-image | Specifies the type of list-item marker. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |