Nested Lists
In HTML, it is possible to create nested lists contained within other lists. This can be useful for creating hierarchical structures, such as outlines or menus.
index.html
99
1
2
3
4
5
6
7
8
9
10
11
<ul>
<li>
First item
<ul>
<li>First sub-item</li>
<li>Second sub-item</li>
</ul>
</li>
<li>Second item</li>
<li>Third item</li>
</ul>
Descriptive lists can also be nested in HTML. To create a nested descriptive list, you can use the <dl>
tag inside another <dl>
tag to create a new nested list.
index.html
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<dl>
<dt>Term 1</dt>
<dd>Description 1</dd>
<dt>Term 2</dt>
<dd>
Description 2
<dl>
<dt>Nested Term 1</dt>
<dd>Nested Description 1</dd>
<dt>Nested Term 2</dt>
<dd>Nested Description 2</dd>
</dl>
</dd>
<dt>Term 3</dt>
<dd>Description 3</dd>
</dl>
When a web browser renders the HTML, the nested descriptive list will be indented and displayed as a sub-list within the top-level descriptive list.
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 2. Capitolo 7
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione