Page 47 - Chinmaya_C7_flipbook
P. 47

Use of TYPE attribute with <OL> tag in HTML.

                 <!DOCTYPE html>
                 <HTML>

                 <HEAD>
                 <TITLE> Ordered List </TITLE></HEAD>
                 <BODY>

                 <H2> List of Fruits that Grow on Trees:</H2>
                 <OL Type="a">
                 <LI>Almonds</LI>
                 <LI>Apples</LI>

                 <LI>Cherries</LI>
                 <LI>Coconuts</LI>
                 <LI>Lychee</LI>

                 <LI>Oranges</LI>
                 <LI>Olive</LI>
                 <LI>Persimmons</LI>

                 </OL>
                 </BODY>

                 </HTML>

                 REVERSED Attribute
                 By  default,  HTML arranges  items  in ascending  order. We  can change  the  order of the  list  in
                 descending order by using the Reversed attribute. Syntax:  <OL REVERSED>


                 Use of REVERSED attribute with <OL> tag in HTML.

                 <!DOCTYPE html>
                 <HTML>
                 <HEAD>
                 <TITLE>Ordered List</TITLE>
                 </HEAD>
                 <BODY>
                 <H2> List of Fruits that Grow on Trees:</H2>

                 <OL Type="a" REVERSED>
                 <LI>Almonds</LI>
                 <LI>Apples</LI>
                 <LI>Cherries</LI>
                 <LI>Coconuts</LI>
                 <LI>Lychee</LI>
                 <LI>Oranges</LI>



                                                                                          Lists and Tables in HTML5  45
   42   43   44   45   46   47   48   49   50   51   52