O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying Styles to Lists

These are the properties you typically use with lists:

  • list-item— Sets the display property to this value to create a list.

  • list-style-image— Sets the image that will be used as the list item marker. Internet Explorer only.

  • list-style-type— Sets the appearance of the list item marker, such as disc, circle, square, decimal, lowercase Roman, uppercase Roman, and others.

Here's an example. In this case, I'm setting the marker in front of each list item in an unordered list to a square using list-style-type. Note that you have to set the display property to list-item:

 TITLE {display: block; font-size: 24pt; font-weight: bold; text-align: center; text-decoration: underline} AUTHOR {display: block; font-size: 18pt; font-weight: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required