Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 24 - 2606_PlugGPT_C7_Flipbook
P. 24

    NESTED LIST

                      An item on a list can contain another list. The list within a list is known as a nested list or sub-list.
                      Write HTML code to create a nested list.

                      <!DOCTYPE html>
                      <HTML>
                      <HEAD><TITLE> Nested List</TITLE></HEAD>
                      <BODY>
                      <H1>List of Fruits and Vegetables</H1>

                      <OL>
                      <LI> List of Fruits
                          <UL>
                          <LI>Apple</LI>
                          <LI>Watermelon</LI>
                          <LI>Orange</LI>
                          <LI>Strawberry</LI>

                          </UL>
                      </LI>
                      <LI> List of Vegetables
                          <UL>
                          <LI>Mushroom</LI>
                          <LI>Potato</LI>
                          <LI>Carrot</LI>
                          <LI>Sweet Potato</LI>
                          </UL>

                      </LI>
                      </OL>
                      </BODY>
                      </HTML>

                       22   Premium Edition-VII

| 19 20 21 22 23 24 25 26 27 28 29 |