Other Lists

In addition to unordered and ordered lists, HTML provides other types of lists, such as definition lists (<dl>, <dt>, <dd>) for describing terms and their definitions. These lists help present data in more descriptive formats, suitable for glossaries, FAQs, or catalogs.

Key Topics

Definition Lists

Example: A definition list uses <dt> for the term and <dd> for its description.

<dl>
    <dt>HTML</dt>
    <dd>A markup language for creating web pages.</dd>
    <dt>CSS</dt>
    <dd>A style sheet language used to control presentation.</dd>
</dl>

Definition List Example

This example shows a definition list in action. A full code sample is provided below.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" >
    <meta name="viewport" content="width=device-width, initial-scale=1.0" >
    <title>Definition List</title>
</head>
<body>
    <h1>Terminology</h1>
    <dl>
        <dt>Server</dt>
        <dd>A computer that provides data to other computers.</dd>
        <dt>Client</dt>
        <dd>A computer that receives data from a server.</dd>
    </dl>
</body>
</html>

Explanation: Definition lists excel at pairing terms with their explanations, making them ideal for glossaries, FAQs, or structured reference materials.

Key Takeaways

  • Definition lists (<dl>, <dt>, <dd>) pair terms with their descriptions.
  • Use definition lists for glossaries, dictionaries, or FAQs.
  • They provide a semantic way to present terms and their meanings.
  • Combining multiple list types enhances content organization.
  • Choose the list type that best fits the nature of your data.