Results 1 to 3 of 3

Thread: Why"ul"

  1. #1
    Join Date
    May 2006

    Unhappy Why"ul"

    Hi, well this might b silly question but being a newbee i want to know

    why we use UL tag for links like


    cant we write it like

    <div> home | about us |.............</div>

    i think the above example ll save coding .as for "ul " , we ve to write code for div' id , ul , li , a , a:hover.

    but for second example i ll write few code for div id,a and a:hover.
    so wat is the advantage of it?

  2. #2
    Join Date
    Mar 2006
    Newcastle NSW Australia
    div is a non-semantic element - it doesn't mean anything in the context of page content. Using ul says "this is a list of links", which is basically what a menu is, and the vision-impared using screen readers can understand the structure. The other nice thing is that within a semantic structure there are 3 nested elements to attach styling to, greatly increasing the visual display possibilities.


  3. #3
    Join Date
    Mar 2005
    Sydney, Australia
    Think of all the non-computer devices that can be used to access the page many of which don't have a display or possibly only a small one. With a list they can all process it as a list and make it accessible for the person to use it. With a div it is just text and the way that it is presented to them may be a jumbled mess especially if it reads out all the vertical bar text.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center