Page 47 - DCAP202_Fundamentals of Web Programming
P. 47

Fundamentals of Web Programming




                    Notes          4.2.2 Ordered List

                                   The ordered list element,  ol, works  just like the unordered list element, including how each
                                   individual list item is created. The main difference between an ordered list and an unordered list
                                   is that with an ordered list the order of which items are represented is important. Instead of
                                   showing a dot as the default list item element, an ordered list uses numbers. Using CSS, these
                                   numbers can then be changed to letters, Roman numerals, and so on.


                                          Example:
                                   <ol  type=”1">
                                     <li>Tamilnadu</li>
                                     <li>Uttar  Pradesh</li>
                                     <li>West-Bengal</li>
                                   </ol>
                                   4.2.3 Definition List


                                   Creating a definition list in HTML is accomplished using the dl element. Instead of using the li
                                   element to mark up list items, the definition list actually requires two elements: the definition
                                   term element, dt, and the definition description element, dd.
                                   A definition list may contain numerous terms and descriptions, one after the other. Additionally,
                                   a definition list may have multiple terms per description as well as multiple descriptions per
                                   term.  A  single  term  may  have  multiple  meanings  and warrant  multiple  definitions.  In
                                   comparison, a single description may be suitable for multiple terms.
                                   <dl>
                                   <dt>study</dt>
                                   <dd>the  devotion  of  time  and  attention  to  acquiring  knowledge  on  an
                                   academic  subject,  esp.  by  means  of  books</dd>
                                   <dt>design</dt>
                                   <dd>a  plan  or  drawing  produced  to  show  the  look  and  function  or  workings  of
                                   a  building,  garment,  or  other  object  before  it  is  built  or  made</dd>
                                   <dd>purpose,  planning,  or  intention  that  exists  or  is  thought  to  exist
                                   behind  an  action,  fact,  or  material  object</dd>
                                   <dt>business</dt>
                                   <dt>work</dt>
                                   <dd>a  person’s  regular  occupation,  profession,  or  trade</dd>
                                   </dl>

                                   Self Assessment

                                   Fill in the blanks:
                                   4.  ........................... lists are purely a list of related items, in which their order does not matter
                                       nor do they have a numbered or alphabetical list element.
                                   5.  By default most browsers represent each list item with a ...........................
                                   6.  The solid dot is referred to as the list item element and can be changed using ...........................
                                   7.  ........................... lists place strong importance on the order of items.

                                   8.  Creating a definition list in HTML is accomplished using the ........................... element.
                                   9.  The ........................... actually requires two elements: the definition term element, dt, and
                                       the definition description element, dd.


          40                                LOVELY PROFESSIONAL UNIVERSITY
   42   43   44   45   46   47   48   49   50   51   52