Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 25 - 2606_PlugGPT_C7_Flipbook
P. 25

    Tick ( ) if you know this.

                          ▶  An ordered list is a list of items where the sequence is very important.
                          ▶  An unordered list is a list of items where the sequence of the list is not significant.

                     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; list-style-image: url('url path'); list-style-position: 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>

                                                                                              Lists and Tables in HTML5  23

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