Results 1 to 6 of 6

Thread: What elements can go in <ul>

  1. #1
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default What elements can go in <ul>

    As the title says, what elements can go in <ul>, before any <li>. I know <li> can, but any others?
    Last edited by Nile; 03-29-2009 at 03:41 PM.
    Jeremy | jfein.net

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    As far as I know (99.999% sure), the only allowed direct child element of the <ul> tag is the <li> tag. Nothing else will validate.

  3. The Following User Says Thank You to Snookerman For This Useful Post:

    Nile (03-29-2009)

  4. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I guess I will use the <li> tag as a parent then. Thanks Snookerman!
    Jeremy | jfein.net

  5. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You're welcome! You can add 0.001% to that value, now I'm totally sure: http://www.w3.org/TR/html401/struct/lists.html

  6. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Out of curiosity, what exactly are you trying to do Nile that you would want another element within an unordered list?

  7. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default



    The inner circle thingy. The one surrounding all the links.
    Jeremy | jfein.net

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
  •