|
|
Sometimes it become necessary to nest lists. One particular example
is the index of a book. HTML allows nesting of lists. Following is
an example of the nesting of lists for upto 3 levels.
<ol>
<li>Level 1 Item 1</li>
<li>Level 1 Item 2</li>
<ul>
<li>Level 2 Item 1</li>
<ul>
<li>Level 3 Item 1</li>
<li>Level 3 Item 2</li>
</ul>
<li>Level 2 Item 2</li>
</ul>
<li>Level 1 Item 3</li>
</ol>
The Output is:
- Level 1 Item 1
- Level 1 Item 2
- Level 2 Item 1
- Level 3 Item 1
- Level 3 Item 2
- Level 2 Item 2
- Level 1 Item 3
You can nest your lists upto as many levels you like, but remember
this nesting should not harm the readibility of your content.
Next >>> Lesson No. 13: The HR Tag
|
|