Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

84 LESSON 5: Organizing Information with Lists


Output ▼


FIGURE 5.9
Nested lists.

DO remember that you can change the
numbering and bullet styles for lists to
suit your preference.
DO feel free to nest lists to any extent
that you like.

DON’T use the deprecated list types;
use one of the other lists instead.
DON’T number or format lists yourself;
use the list tags.
DON’T use list tags to indent text on a
page; use Cascading Style Sheets.

DO DON’T


Other Uses for Lists


Lists have moved a long way past simple bullets. As it turns out, lists are very useful
when designing web pages because of the structure they provide. Semantically speaking,
there are many common elements of web design that naturally lend themselves to list-like
structures. Here are some advanced examples of how lists are used that combine a num-
ber of concepts that will be introduced throughout the book.
Many websites have lots of navigation links to present, and to keep from cluttering up
the page, they use nested pull-down menus similar to those used in desktop applications.
In this lesson, you’ve already seen that you can create nested lists in HTML. You can
put your navigation links in such lists and then use CSS to radically change their appear-
ance so that rather than looking like other lists, they instead look and behave like menus.
There’s an example of such menus in Figure 5.10.
Free download pdf