简体   繁体   中英

Multiple UL inside LI?

Im creating a nested grid based menu. UL = row and LI = column. The outcome is successful and I was able to avoid too much div mark ups.

My question is if it's VALID to have multiple instances of UL inside LI?

<nav>
    <ul>
        <li><a href="#">(VALID)</a></li>
        <li><a href="#">(VALID)</a>
            <ul>
                <li>link1</li>
                <li>link2</li>
            </ul>
        </li>
        <li><a href="#">(I'M NOT SURE)</a>
            <ul>
                <li>
                    <ul>
                        <li>any contents here</li>
                        <li>any contents here</li>
                    </ul>  
                    <ul>
                        <li>any contents here</li>
                        <li>any contents here</li>
                    </ul>
                    <ul>
                        <li>any contents here</li>
                        <li>any contents here</li>
                    </ul>
                </li>
            </ul>
        </li>
    </ul>
</nav>

fiddle

Yes ......its vaild..... You can nest it to as much as u want ..there is no limit. .....

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM