Unordered list presentation
By default, user agents insert a bullet before each list item in an unordered list. Leaving an unordered list unstyled (that is, applying no style sheet properties to it) is a reliable shortcut to having your information appear as an indented bulleted list.
But that sells the usefulness of the unordered list element
short. By applying style properties, an unordered list may be
presented however you like. You can change the shape of the bullets
with the list-style-type
property
(this property replaces the deprecated type
attribute that is discouraged from
use). The list-style-image
property
allows you to use your own image as a bullet. Style properties for
lists are discussed in Chapter
23.
And that’s just the beginning. You can set lists to display horizontally, too. You can even use unordered list markup as the structure underlying a rich graphical navigation toolbar with rollover effects, all accomplished with Cascading Style Sheets. These techniques are outlined in Chapter 24.
Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.