How to create Nested List in HTML
Nested List
HTML provides a way to create a list inside another list . That is called nesting of lists. In this we can use <ul> tag inside <ol> tag and vice-versa. Using this we can create multiple lists inside one list.
Code Snippet:
<html>
<body>
<ol>
<li>Fruits
<ul>
<li>Mango</li>
<li>Banana</li>
<li>Orange</li>
</ul>
</li>
<li>Vegetables</li>
</ol>
</body>
</html>
<body>
<ol>
<li>Fruits
<ul>
<li>Mango</li>
<li>Banana</li>
<li>Orange</li>
</ul>
</li>
<li>Vegetables</li>
</ol>
</body>
</html>
Comments
Post a Comment