Page 45 - DCAP202_Fundamentals of Web Programming
P. 45

Fundamentals of Web Programming




                    Notes


                                     Notes  A <BR> tag is not inserted at the end of an item beginning with a <LI> tag, as a line
                                     break automatically occurs at that point.
                                   Since a list tag is an empty tag (that is, there is no negating counterpart </LI>), and since it indents
                                   the text following it, it cannot be alone; otherwise, the entire remainder of the document would
                                   be indented.

                                   4.1 HTML List Classes

                                   The HTML List classes allow you to easily create lists within your HTML pages. These classes
                                   provide methods to get and set various attributes of the lists and the items within the lists.
                                   In particular, the parent class  HTML List provides a method to  produce a compact list that
                                   displays items in as small a vertical space as possible.

                                      Methods for HTML List include:
                                           Compact the list
                                           Add and remove items from the list

                                           Add and remove lists from the list (making it possible to nest lists)
                                      Methods for HTML List Item include:
                                           Get and set the contents of the item
                                           Get and set the direction of the text interpretation

                                           Get and set the language of the input element
                                   Use the subclasses of HTML List and HTML List Item to create your HTML lists:
                                      OrderedList and OrderedListItem
                                      UnorderedList and UnorderedListItem

                                   4.1.1 OrderedList and OrderedListItem

                                   Use the OrderedList and OrderedListItem classes to create ordered lists in your HTML pages.

                                      Methods for OrderedList include:
                                           Get and set the starting number for the first item in the list
                                           Get and set the type (or style) for the item numbers

                                      Methods for OrderedListItem include:
                                           Get and set the number for the item
                                           Get and set the type (or style) for the item number



                                     Did u know?  By using the methods in OrderedListItem, you can override the numbering
                                     and type for a specific item in the list.







          38                                LOVELY PROFESSIONAL UNIVERSITY
   40   41   42   43   44   45   46   47   48   49   50