Does everything inside a <ul> have to be wrapped in an <li>?
- by Drew
Hello,
I need some guidance about nested lists in HTML.
I have a layout that I would like to be built like below. Is it a terrible thing to nest an element not wrapped by an <li>? I'm fairly sure that it is against standards, but don't know what ill effect it has.
<ul>
<li>
<h1>header 1</h1>
<li>
<ul>
<li>nested</li>
<li>list</li>
</ul>
</li>
</li>
<li>
<h1>header 2</h1>
<li>
<ul>
<li>nested</li>
<li>list</li>
</ul>
</li>
</li>
</ul>