Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 53 - 2609_Logiccode
P. 53

    The table below shows the attributes of the <OL> tag:

                             Attribute                   Value                             Description
                              Name

                                                                           It is used to choose the kind of numbering
                      TYPE                      1, a, A, i and I
                                                                           for the list items.

                                                                           It is used to set the beginning value for the
                      START                     Natural number             first list item in an ordered list. The value
                                                                           must always be an integer.

                                                                           It is used to start the list in a descending
                      REVERSED                  None
                                                                           order.

                     Code 1.  Write the HTML code to present the given web page using the <OL> tag to create an
                             ordered list.

                     <!DOCTYPE HTML>

                     <HTML>
                     <HEAD>

                     <TITLE>Ordered List Example

                     </TITLE>
                     </HEAD>

                     <BODY

                     STYLE="BACKGROUND-COLOR: #d5ecd7;">
                     <H1>Importance of Forests</H1>

                     <OL>

                     <LI>Provide Habitat for Wildlife</LI>
                     <LI>Help in Maintaining the Water Cycle</LI>

                     <LI>Prevent Soil Erosion</LI>

                     </OL>
                     </BODY>

                     </HTML>
                     In the above code, the list starts at 1 because the TYPE and START attributes are missing. You can

                     customise the default numbering and beginning point for the ordered list.
                     By using the TYPE attribute, you can create:

                       Numbers: 1, 2, 3, 4. (If no value for type is specified, then this format will be displayed.)

                                                                                              Lists and Tables in HTML5  51

| 48 49 50 51 52 53 54 55 56 57 58 |