SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: List Header lh?

  1. #1
    SitePoint Zealot
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    List Header lh?

    In the past i always did put the heading above the list and it looks like most people do it that way:

    Code:
    <h2>List</h2>
    <ul>
      <li>car</li>
      <li>cat</li>
      <li>dog</li>
    </ul>
    I thought about if
    Code:
    <ul>
      <h2>List</h2>
      <li>car</li>
      <li>cat</li>
      <li>dog</li>
    </ul>
    would be the right way.

    And stumbled over the lh tag the first time.
    Never saw it before in a book or article and wonder.
    If there is this tag, why it is not much in use?

    Code:
    <ul>
      <lh><h2>List</h2></lh>
      <li>car</li>
      <li>cat</li>
      <li>dog</li>
    </ul>
    Sure you can wrap a section around the list in html5, but that is extra markup.

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    The LH was thought about in a HTML 3.0 Draft around 1995, but never made the Recommendations so don't use it.

    Generally the first version you wrote makes most sense. Since the H2 is introducing a list of 3 items. The second one is INVALID. Though I suspect you meant wrap the H2 in a LI element, which although that would be valid normally it's not considered good practice.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,296
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Yes, stick with the first version. Much better.


Bookmarks

Posting Permissions

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