Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 42 - 2607_Trackpad_Pro_5.1_flipbook_C7
P. 42

    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>

                                                                                              Lists and Tables in HTML5  41

| 37 38 39 40 41 42 43 44 45 46 47 |