Page 51 - Trackpad_V5_Book 7
P. 51

LIST WITH CSS

            We can make a list attractive using CSS properties. The default type of bullet that appears in an
            unordered list is a disc. CSS properties for lists are:




                   Property                     Value                             Description



               list-style-image     url                               Set a picture or image as a list item

               list-style-position  inside, outsides                  Specify the position of list item
               list-style-type      disc, circle, square, none        Specify the style of bullets for list item

            The syntax for using the list-style-type property is: <UL Style = "list-style-type:value">

            Write HTML code to create a list by using properties of CSS.


            <!DOCTYPE html>
            <HTML>

            <HEAD>

            <TITLE> List</TITLE></HEAD>

            <BODY>

            <H2>Types of Pollution:</H2>

            <UL style="list-style-type:square">
            <LI>Air Pollution</LI>

            <LI>Water Pollution</LI>

            <LI>Noise Pollution</LI>

            <LI>Soil Pollution</LI>

            </UL>

            </BODY>
            </HTML>




                                   Subject: Create a line break

                                   To create a line break, we can use <LI> tag which automatically creates a line
                                   break. We can also put paragraph, line breaks, images, links, other lists, etc.
                                   within this list.







                                                                                     Lists and Tables in HTML5  49
   46   47   48   49   50   51   52   53   54   55   56