18. Nested Lists and Definition Lists
18.1 Nested Lists
You can embed one list inside another to create hierarchical structures. The inner list must be placed inside an <li> element of the outer list.
html
<ul> <li>Fruits <ul> <li>Apple</li> <li>Banana</li> </ul> </li> <li>Vegetables <ol> <li>Carrots</li> <li>Broccoli</li> </ol> </li> </ul>18.2 Definition Lists (<dl>)
Definition lists are used for presenting glossary-style data where terms are paired with their definitions.
<dl>: Definition List (the container)<dt>: Definition Term (the word/phrase being defined)<dd>: Definition Description (the definition itself)
html
<dl> <dt>HTML</dt> <dd>HyperText Markup Language, the structural foundation of web content.</dd><dt>CSS</dt>
<dd>Cascading Style Sheets, used for styling and presentation.</dd>
</dl>