Style Sheet Rules for HTML Lists

When designing pages with lists and their properties using Cascading Style Sheets, the web designer has more presentation options for the Ordered and Unordered List.

List-style-type:

List types:

Default disc, circle, square
Decimal
  1. First item
  2. Second item
Decimal-leading-zero
  1. First item
  2. Second item
Lowercase Roman numerals
  1. First item
  2. Second item
Uppercase Roman numerals
  1. upper-roman
  2. second item
start="126"
list-style-type:decimal
list-style-type:decimal
  1. Monday
  2. Tuesday
  3. Wednesday
List-style-image:url Defines a bullet image file
UL {list-style-image:url(images/aqua.gif)}
  • Types of Ordered Lists
  • List with an image button
List-style-position Defines placement of the list marker. Values: inside, outside ol {list-style-position:outside}
  1. List position is outside - default
  2. Second item
  3. Third item
List-style-Inside ol {list-style-position:inside}
  1. List position is inside
  2. Second item
  3. Third item
Marker-offset
Part of CSS2
Defines the distance between the bullet and the text. auto - browser determines distance or specify the distance. UL {style="list-style:url(images/blbullet.gif);marker-offset:15px}
  • Types of Ordered Lists
Web Design with XHTML Part I
Doris Cuffey, Instructor