Reputation: 9
Is there any difference between structuring a list in both of these ways? They both look the same in browser but is there a difference functionally?
Note: The difference is the "Types of sugar" list item and how it's structured.
<ul>
<li>Milk</li>
<li>Bread</li>
<li>Types of sugar:</li>
<ul>
<li>Brown sugar</li>
<li>White sugar</li>
</ul>
<li>Water</li>
</ul>
<ul>
<li>Milk</li>
<li>Bread</li>
<li>
<ul>Types of sugar:
<li>Brown sugar</li>
<li>White sugar</li>
</ul>
</li>
<li>Water</li>
</ul>
Upvotes: 0
Views: 17
Reputation: 15685
The first way is technically incorrect. a ul can not be the child of a ul
Upvotes: 1