HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

Chapter 15


Lists and Menus


Contents


15.1 Basic Markup..................... 156
15.2 Vertical Indented Lists............... 157
15.3 ol: Ordered Lists................... 157
15.4 ul: Unordered Lists................. 158
15.5 li: List Items..................... 159
15.6 Horizontal Lists (Dropdown Menus)....... 159
15.7 For Further Study.................. 161

Just as tables have been around forever, lists have too. But instead of
presenting tabular (two dimensional) material, lists are linear (one dimen-
sional). They can be numbered (or lettered) or just have bullets (or nothing
at all). And they can have sub-lists.


15.1 Basic Markup


If the list is to be numbered, we begin it with

    (for “ordered list”) and
    end it with
(required). We start each item with
  • and end it with


  • (optional).

    If the list is to have bullets (un-numbered), we begin it with

      (for
      “unordered list”) and end it with
    (required). We start each item
    with
  • and end it with
  • (optional).


    156

    Free download pdf