Categories
HTML Tutorials

Description list

Description lists group terms and descriptions into a single list and require three elements to complete the list:

  1. <dl>: Holds the list descriptions (dl = description list)
  2. <dt>: Defines a term in the list (dt = definition term)
  3. <dd>: Defines a description for a term (dd = description list description)

You can have as many terms (defined by <dt>) in a list (<dl>) as you need. Each term can have one or more descriptions (defined by <dd>).

The following description list includes three terms, one of which has two descriptions :

<html>
  <head>
    <meta charset="UTF-8" />
    <title>Definition Lists</title>
  </head>
  <body>
    <h1>Markup Language Definitions</h1>
    <dl>
      <dt>SGML</dt>
      <dd>The Standard Generalized Markup Language</dd>
      <dt>HTML</dt>
      <dd>The Hypertext Markup Language</dd>
      <dd>The markup language you use to create web pages.</dd>
      <dt>XML</dt>
      <dd>The Extensible Markup Language</dd>
    </dl>
  </body>
</html>
Markup Language Definitions

SGMLThe Standard Generalized Markup LanguageHTMLThe Hypertext Markup LanguageThe markup language you use to create web pages.XMLThe Extensible Markup Language