Section F.9. Unordered Lists


F.9. Unordered Lists

Up to this point, we have presented basic XHTML elements and attributes for linking to resources, creating headers, using special characters and incorporating images. In this section, we discuss how to organize information on a Web page using lists. In Appendix G, we introduce another feature for organizing information, called a table. Figure F.10 displays text in an unordered list (i.e., a list that does not order its items by letter or number). The unordered list element ul creates a list in which each item begins with a bullet symbol (called a disc). Each entry in an unordered list (element ul in line 20) is an li (list item) element (lines 23, 25, 27 and 29). Most Web browsers render these elements with a line break and a bullet symbol indented from the beginning of the new line.

Figure F.10. Unordered lists in XHTML.

  1  <?xml version = "1.0" ?>  2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"  3     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">  4  5  <!-- Fig. F.10: links2.html               -->  6  <!-- Unordered list containing hyperlinks -->  7  8  <html xmlns = "http://www.w3.org/1999/xhtml">  9     <head> 10        <title>Internet and WWW How to Program - Links </title> 11     </head> 12 13     <body> 14 15        <h1>Here are my favorite sites </h1> 16 17        <p><strong>Click on a name to go to that page.</strong></p> 18 19        <!-- create an unordered list --> 20        <ul> 21 22           <!-- add four list items --> 23           <li><a href = "http://www.deitel.com"> Deitel</a></li> 24 25           <li><a href = "http://www.w3.org"> W3C </a></li>       26 27           <li><a href = "http://www.yahoo.com"> Yahoo!</a></li>  28 29           <li><a href = "http://www.cnn.com"> CNN</a></li>       30         </ul> 31     </body> 32  </html> 



Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net