You are here:About>Computing & Technology>Web Design / HTML> CSS> Beginning CSS> CSS Tutorial> CSS and Lists - Bulleted Lists, Numbered Lists
About.comWeb Design / HTML
Newsletters & RSSEmail to a friendSubmit to Digg
HTML Tutorials / Web Design Tutorials / CSS Tutorials

HTML 4.01 Tutorial / XHTML 1.0 TutorialCSS 1 and CSS 2 TutorialXML Tutorial

CSS and Lists

From Jennifer Kyrnin,
Your Guide to Web Design / HTML.
FREE Newsletter. Sign Up Now!
Style the List Type:

In CSS there are two types of lists: numbered and bulleted (as opposed to HTML, which has the definition list as well). But there are different types of bullets and numbers you can define with CSS using the list-style-type property:

list-style-type: lower-roman;
Use An Image as the Bullet:

Sometimes, it's nice to have a custom bullet to use instead of the boring circle, square, or disc supplied as the default bullets. With the list-style-image property you can indicate a bullet image to use instead:

list-style-image: url(image.gif);
Where Should the Bullet Be Positioned:

Even the placement of the bullet and where the text will flow around it can be defined with CSS using the list-style-position property:

list-style-position: inside;
The list-style Shorthand Property:

But if you want to define all aspects of your lists in one place you won't go wrong using the list-style shorthand property:

list-style: alpha inside url(image.gif);
 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.