Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 113 - CodePilot V5.0 C7
P. 113

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

                       Attribute Name              Value                               Description

                      TYPE                  1, a, A, i and I       It is used to choose the kind of numbering for the
                                                                   list items.
                      START                 Natural number         It is used to set the beginning value for the first list
                                                                   item in an ordered list. The value must always be an
                                                                   integer.

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

                        Code     Write the HTML code to present the given web page using the <OL> tag to create an
                          1      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.)

                         Roman numerals (uppercase and lowercase): I, II, III, IV, i, ii, iii, iv
                         Letters of the alphabet (uppercase and lowercase): A, B, C, D, a, b, c, d

                                                                                                                      111
                                                                                              Lists and Tables in HTML5

| 108 109 110 111 112 113 114 115 116 117 118 |