Empty UL inside LI element

Posted by zorglub76 on Stack Overflow See other posts from Stack Overflow or by zorglub76
Published on 2010-05-20T12:35:29Z Indexed on 2010/05/20 12:40 UTC
Read the original article Hit count: 225

Filed under:
|
|

Can anyone explain me why the hell UL element cannot be empty?

And why this HTML:

<ul>
    <li class="header">
        <a href="#">Work</a>
        <ul/>
    </li>
    <li class="header">
        <a href="#">New</a>
        <ul/>
    </li>
    <li class="header">
        <a href="#">Ungrouped</a>
        <ul/>
    </li>
    <li class="header">
        <a href="#">Offline</a>
        <ul/>
    </li>
</ul>

is rendered like this:

Work

-->New

---->Ungrouped

------>Offline

© Stack Overflow or respective owner

Related posts about html

Related posts about list