Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 79 - 2612_Digimind
P. 79

    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  77

| 74 75 76 77 78 79 80 81 82 83 84 |