The
nested lists to work, the ul and/or ol elements must contain only li elements —
no paragraphs, blockquotes, and so forth. The nested list has to be contained
within an li element, and cannot be a "child" of the ul or ol
element. Be very careful to open and close your elements properly.
<!DOCTYPE html>
<html>
<body>
<h2>A Nested List</h2>
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
</body>
</html>
No comments:
Post a Comment