HTML
  Home arrow HTML arrow Page 2 - Designing with Nested HTML Lists
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

Designing with Nested HTML Lists
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2009-05-15

    Table of Contents:
  • Designing with Nested HTML Lists
  • Using nested HTML lists
  • Coding multiple sub lists
  • Building a nested HTML list with multiple sub-levels

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Designing with Nested HTML Lists - Using nested HTML lists


    (Page 2 of 4 )

    To be frank, building a nested HTML list is a no-brainer process that can be tackled with minor hassles even by inexperienced web designers. Basically, the process requires only that you include a new list within one or more items of the parent element, in this manner achieving a nested structure.

    However, it's necessary to clarify this concept a bit further, so let me show you a functional example that illustrates how to build a basic nested HTML list. Thus, take a look at the following code sample, which  constructs this web page element. Here it is:


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <title>Example on building nested HTML lists</title>

    </head>

    <body>

    <h1>Example on building nested HTML lists</h1>

    <ul>

    <li>List Item 1</li>

    <li>List Item 2

    <ul>

    <li>Sub Item 1</li>

    <li>Sub Item 2</li>

    <li>Sub Item 3</li>

    <li>Sub Item 4</li>

    <li>Sub Item 5</li>

    </ul>

    </li>

    <li>List Item 3</li>

    <li>List Item 4</li>

    <li>List Item 5</li>

    <li>List Item 6</li>

    <li>List Item 7</li>

    <li>List Item 8</li>

    <li>List Item 9</li>

    <li>List Item 10</li>

    </ul>

    </body>

    </html>


    Undeniably, the above practical example is so easy to grasp that it speaks for itself. As you can see, in this case, one parent unordered list has been included into a sample web document, and a child list has been hung from one of the parent's items. Obviously, the result of this process is a nested list that implements a primitive hierarchical structure.

    In addition, to complement the previous explanation, I've included a screen capture below that shows how this sample nested HTML list is displayed on the browser. Have a look at it, please:



    Of course, the previous code example is extremely simplistic, so you shouldn't have major problems understanding how it functions. However, it's helpful for demonstrating how easy it is to build a simple nested HTML list that contains only one subgroup of items.

    Therefore, now that you've hopefully grasped the logic that drives the construction of nested HTML lists, it's time to see how to create more complex structures with these web page elements. For instance, it would be illustrative to include a couple of additional sub lists within the parent list, so you can see how more complicated nested lists can be created with minor hassles.

    Considering that you're interested in learning how to accomplish this, in the section to come I'll be coding a brand new example to show how to hang multiple sub lists within the same parent.

    As usual, click on the link that appears below and read the following segment.

    More HTML Articles
    More By Alejandro Gervasio


       · This introductory part of the series goes through the basics of creating nested...
     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek