=========================================================================== Today on The World Vol. 4 #153 Friday, June 12, 1998 =========================================================================== So, have you recovered from my Web interoperability rant in the previous installment? Back to the HTML tutorial... now we get into the more exotic stuff. We'll start with lists, which are not that difficult to learn. (Next week, after a brief detour into the world of "entities", we'll tackle a subject that baffles many HTML authors: tables. The part about tables will build on what I discuss today regarding lists.) (kibo) --------------------------------------------------------------------------- HTML TUTORIAL -- CHAPTER 7 -- LISTS 7.1 Basic lists A "list", in HTML, is what its name implies -- a list of things, displayed as a normal human-readable list that looks like this: 1. Apples 2. Bananas 3. Coconuts You could make that out of

's, but it's hard to keep everything lined up, and of course you'd have to renumber all the items every time you add one in the middle. Fortunately, HTML has all sorts of tags that make lists for you. HTML lists count as a kind of text container, like

...

,

...

, or
...
. There are several kinds of lists (most of which you'll never use) but they all share a common feature: The list itself is a pair of tags (such as or
    ...
) containing individual list items (
  • ...
  • ). No matter what type of list it is, the items inside are always
  • ...
  • . (Note that some people do not put after each item. While this was permitted in early versions of the HTML standard -- when

    was also optional -- I suggest that you follow modern HTML style and use .) Try adding this to any of your practice HTML pages:

    Example of "UL"

    What does that look like in your browser? It probably has bullets (large dots) in front of every list item, and it's probably indented. (Note that these lists are displayed slightly differently in different browsers.) Now for comparison let's add a second kind of list:

    Example of "OL"

    1. Apples
    2. Bananas
    3. Coconuts
    View that in your browser, and note the difference. What do you think