H

HTML Handbook

Clean • Professional

Other HTML Lists

1 minute

Definition List (<dl>, <dt>, <dd>)

A Definition List in HTML is used to display a list of terms and their corresponding descriptions. It is commonly used for glossaries, dictionaries, FAQs, or to present metadata.

It consists of three main tags:

  • <dl> (Definition List): The container that holds the entire list.

  • <dt> (Definition Term): Defines the term or name.

  • <dd> (Definition Description): Provides the definition or explanation of the term.

Example:

<h3>Technical Terms</h3>
<dl>
  <dt>HTML</dt>
  <dd>- A markup language for creating web pages.</dd>

  <dt>CSS</dt>
  <dd>- A stylesheet language for designing web pages.</dd>

  <dt>JavaScript</dt>
  <dd>- A programming language to add interactivity.</dd>
</dl>

Output :

learn code with durgesh images

Nested Lists

A nested list means placing one list inside another.

This is useful for showing categories with subcategories.

Example:

<h3>Subjects</h3>
<ul>
  <li>Science
    <ol>
      <li>Physics</li>
      <li>Chemistry</li>
      <li>Biology</li>
    </ol>
  </li>
  <li>Mathematics</li>
  <li>English</li>
</ul>

Output : 

learn code with durgesh images

Quick Comparison Table

List TypeTag(s) UsedPurposeExample Use
Ordered List<ol> <li>Numbered itemsSteps, rankings
Unordered List<ul> <li>Bulleted itemsFeatures, groceries
Definition List<dl> <dt> <dd>Term + definitionGlossary, FAQ
Nested List<ul>/<ol> inside <li>Hierarchical listsMenus, outlines

FlowChart Of HTMl Lists

learn code with durgesh images

Article 0 of 0