An important HTML tag type is the List. HTML supports three types of lists: ordered lists, unordered lists, definition lists.
All lists begin and end with an implicit

and, except for the definition list (see below), they all take the form:


Optional list header

  • Item in the list

  • ...
  • Item in the list

  • Ordered Lists use

      to open the list and
    to close the list.

    1. The items in an ordered list look like this.
    2. But the list doesn't have to be numbered!
      1. causes the list
      2. to be lettered in CAPS
        1. causes the list
        2. to be lettered in lower case
          1. causes the list
          2. to be numbered with large Roman Numerals
            1. causes the list
            2. to be numbered in small Roman Numerals
            1. And you can even start somewhere
            2. other than the beginning with
                ,
              1. where ## is the starting number. (Translate letters and numerals into their corresponding numbers, i.e. E=5, b=2, III=3, etc.)
              NOTE: The above stuff about TYPE and START is HTML 2.0 and might not be recognised by Netscape 2.0.
              What follows is the HTML 3.0 equivalents, but they may not be recognised by any browser!

              To start the numbering at a specific place, add SEQNUM=num to the

                tag, where num is the number to start the numbering with.
                Adding CONTINUE to the
                  tag will pick up the numbering of this list where the last list left off.

                  So, a list starting at 49 would look like this:


                    ...

                  Unordered Lists use

                  to open and close the list.

                  • The items in an unordered list look like this.
                  • You can also change what the bullet looks like
                    • causes the bullet to be a disc
                      • causes the bullet to be a square
                        • is the default.
                        NOTE: The above stuff about TYPE is HTML 2.0 and might not be recognised by Netscape 2.0.
                        Just as with ordered lists, what follows is the HTML 3.0 equivalents, but they also may not be recognised by any browser!

                        The unordered list can be modified by adding tags to the opening

                          tag. Adding PLAIN will create a list with no bullets.
                          Adding WRAP= will make your list "wrap" into columns. WRAP=vert will make the list start a new column after reaching the bottom of the page. WRAP=horiz will make the list divide into as many columns as the page has room for.
                          To use some other image instead of the standard bullet, include SRC="/crash/picture.html", where picture is a link to the image you want to use. (See the next lesson: images)

                          An unordered list with no bullets that wraps vertically would look like this:


                            ...

                          NOTE: Here's a neat trick. If you want something indented, you can use and unordered list. Just put your text in an unordered list with no list items.

                          Example:

                              Indented text

                          Definition lists are two-part lists, useful for things like glossaries or defining lists of terms.

                          is used to open and close the list. The list items have two parts: the term and the definition. The definition term is enclosed in
                          and should precede the definition definition. The definition definition is enclosed in
                          . A list header can also be added as with the other list types. So, the whole thing looks like:


                          list header
                          term
                          definition

                          ...
                          term
                          definition

                          NOTE: The definition term and the definition definition do NOT have to be on the same line like in the example.

                          Definition List:
                          This is how they look when viewed with a browser.
                          Their Use:
                          They are useful for any list shaped like this!

                          One useful feature of lists is that they can be nested, i.e. one lists is a List Item of another list, like this:


                          • You can have one list...


                            1. Inside of another list...


                              1. Inside of another!



                          Which looks like this:

                          • You can have one list...
                            1. Inside of another list...
                              1. Inside of another!

                          Tables are 2-dimesional lists. They are coded similarly to definition lists. They have an implicit
                          at the beginning and end. The format is:


                          ...
                          ...
                          ...
                          Table Entry Table Entry
                          Table Entry Table Entry

                          Each row is encapsulated in . Within the row are cells, enclosed in . The whole table is opened and closed with

                          . There can be as many rows and columns as you want and as will fit on the screen. The browser will autoformat the rows, vertically centering cell contents if necessary.
                          If you want a cell to span more than one column, enclose it in , where ## id the number of columns to span. Similarly, will cause the cell to span ## rows.
                          A border can the placed around all the cells by using
                          , where ## is the number of pixels thick the border should be.

                          Tables can contain
                          any amount of
                          INFORMATION !!!
                          INFORMATION

                          
                            
                          Tables can contain
                          any amount of
                          INFORMATION !!!
                          INFORMATION

                          Centering can be accomplished with the

                          tags,

                          Like this!

                          NOTE: Structures such as centering, tables, lists and headings sometimes ignore formatting applied outside of the structure's limits. So,

                          text
                          may not make "text" bold.
                          text
                          may be needed in this case.

                          The next lesson is Links.

                          Take the Structures Pop Quiz

                          Return to the Menu