Home arrow HTML arrow Building a Bulleted Menu Of Links: Display Method

Building a Bulleted Menu Of Links: Display Method

Many web pages display their links in the form of a bulleted menu. You can make such menus a bit more interesting by adding functionality to expand and contract the menu, if it makes sense to divide the menu into levels. This two-part article will show you how to do it.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
February 23, 2009
  1. · Building a Bulleted Menu Of Links: Display Method
  2. · Operation from the User’s Point of View
  3. · Implementation
  4. · The UL and LI elements

print this article

Building a Bulleted Menu Of Links: Display Method
(Page 1 of 4 )


Many web pages have their links on the left side of the page in a column. Consider such a web page with the following three hypothetical links:

  • First Level Link 1

  • First Level Link 2

  • First Level Link 3

Fig.1 Three links

Each of these links is inside a list item of an unordered list. Note the bullet in front of each link. When you click a link, a new web page is obtained and displayed on the browser. Code can be written so that when you click a bullet, the corresponding list item “expands” such that you see another list of links, associated with the list item, below it. The following figure shows a case where all list items have been expanded:

  • First Level Link 1 

    • Second Level Link 11

      • Third Level Link 111

      • Third Level Link 112

      • Third Level Link 113

    • Second Level Link 12

      • Third Level Link 121

      • Third Level Link 122

      • Third Level Link 123

    • Second Level Link 13

      • Third Level Link 131

      • Third Level Link 132

      • Third Level Link 133

  • First Level Link 2

    • Second Level Link 21

      • Third Level Link 211
      • Third Level Link 212

      • Third Level Link 213

    • Second Level Link 22

      • Third Level Link 221

      • Third Level Link 222

      • Third Level Link 223
    • Second Level Link 23

      • Third Level Link 231

      • Third Level Link 232

      • Third Level Link 233
  • First Level Link 3

    • Second Level Link 31

      • Third Level Link 311

      • Third Level Link 312

      • Third Level Link 313
    • Second Level Link 32

      • Third Level Link 321

      • Third Level Link 322

      • Third Level Link 323
    • Second Level Link 33

      • Third Level Link 331

      • Third Level Link 332

      • Third Level Link 333

Fig.2 The bulleted list, completely expanded.

While a list item is expanded into a sub list, if you click its bullet (not the link) again, the list item should collapse, that is, its sub list should disappear, as well as the space occupied by the sub list.

blog comments powered by Disqus

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials