Page 43 - TP_V5.1_C7_fb
P. 43

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
   38   39   40   41   42   43   44   45   46   47   48