<ul> Tags Not Validating

Discussion in 'HTML & Website Design' started by gobbly2100, Sep 12, 2007.

  1. #1
    Hey,

    I am trying to make sure my page validates but it seems to have a problem with me doing a list like so:

    
    <ul>
    <li>SECTION 1</li>
      <ul>
        <li>link</li>
        <li>link</li>
      </ul>
    <li>SECTION 2</li>
      <ul>
        <li>link</li>
        <li>link</li>
      </ul>
    <ul>
    
    Code (markup):
    I want to make a list like this to style the left menu down the side of my site.

    Should I just make totaly new lists for each section instead?
     
    gobbly2100, Sep 12, 2007 IP
  2. KipperMyHero

    KipperMyHero Peon

    Messages:
    9
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Looks like the close </ul> tag is missing. :)
     
    KipperMyHero, Sep 12, 2007 IP
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Nope. He needs to take the </li> tag above the nested lists and wrap them AROUND the nested lists, like so:

    
    <ul>
        <li>List Item</li>
        [b]<li>List Item
            <ul>[/b]
                <li>List Item</li>
                <li>List Item</li>
                <li>List Item</li>
            [b]</ul>
        </li>[/b]
        <li>List Item</li>
        <li>List Item</li>
    </ul>
    
    Code (markup):
     
    Dan Schulz, Sep 12, 2007 IP
  4. thewall

    thewall Guest

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    the last tag UL should be </ul>.
     
    thewall, Sep 12, 2007 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Nope. Like I said, there are other issues. The code I provided is the proper way to nest lists of lists.
     
    Dan Schulz, Sep 12, 2007 IP
  6. gobbly2100

    gobbly2100 Banned

    Messages:
    906
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Oh awesome, thanks Dan :)

    Validates now!
     
    gobbly2100, Sep 13, 2007 IP