CSS lists are one of the most versatile elements of web design. Aside from being used for making, well, lists, they are also used for navigation, layouts, slideshows, carousels, and so on.
Let's see some of their properties.
The list-style
CSS property is shorthand for the list-style-type
, list-style-image
, and list-style-position
properties. These properties are actually the values that the list-style
CSS property supports. We'll see all these properties next.
The list-style
property supports one, two, or three values, in any order. If a value isn't declared, it will use its default value.
CSS:
/*Default values*/ ul { list-style: disc outside none; } /*One value, the other two are default*/ ul { list-style: circle; } /*Two values, the other one is defaults*/ ul { list-style: lower-roman inside; } /*Three values*/ ul { list-style: decimal outside url(../images/list-bullet.png); }