Page 114 - HTML5
P. 114

An unordered list can be created with the <ul> tag and each list item can be created with the <li>
        tag as shown by the example below:


         <ul>
           <li>Item</li>
           <li>Another Item</li>
           <li>Yet Another Item</li>
         </ul>


        This will produce a bulleted list (which is the default style):


                  •  Item
                  •  Another Item
                  •  Yet Another Item

              You should use ul to display a list of items, where the order of the items is not
              important. If changing the order of the items makes the list incorrect, you should use
              <ol>.


        Ordered List


        An ordered list can be created with the <ol> tag and each list item can be created with the <li> tag
        as in the example below:


         <ol>
           <li>Item</li>
           <li>Another Item</li>
           <li>Yet Another Item</li>
         </ol>


        This will produce a numbered list (which is the default style):


                  1.  Item
                  2.  Another Item
                  3.  Yet Another Item



        Manually changing the numbers


        There are a couple of ways you can play with which numbers appear on the list items in an
        ordered list. The first way is to set a starting number, using the start attribute. The list will start at
        this defined number, and continue incrementing by one as usual.


         <ol start="3">
           <li>Item</li>
           <li>Some Other Item</li>
           <li>Yet Another Item</li>
         </ol>


        This will produce a numbered list (which is the default style):




        https://riptutorial.com/                                                                               98
   109   110   111   112   113   114   115   116   117   118   119