How to Create a Definition List In HTML

HTML


In this article, we show how to create a definition list in HTML.

Below is a definition list in HTML which is very common in forms on the web, such as when a user looks up the definition for a certain term.

Asian Fruits

Lychee
A fruit from the soapberry family that is red or pale orange, and that is tough, bumpy, and can easily be peeled, resembling large raspberries.
Mangosteen
A tropical fruit that is believed to have originated in the Sunda Islands and the Moluccas of Indonesia that is described as sweet and tangy, juicy, and somewhat fibrous, with an inedible, deep reddish purple-colored rind when ripe.
Longans
A tropical fruit grown in the Indomalaya ecozone that has an inedible brown skin with white juicy, sweet flesh inside covered over a black seed.


Unlike ordered or unordered lists, a definition list neither has numbers or bullets. It just indents the definiton with white space, as is done with standard definitions.

Coding

To create the definition list shown above, the HTML code is:



Formal Elements To Create a Definition List
Opening and closing dl tags- The dl tags define the entire definition list. This encloses the dt and the dd tag and must go before them.

Opening and closing dt tags- The dt tags define each definition term. In this example above, "durian", "mangosteen", and "longans" are the definition terms.

Opening and closing dd tags- The dd tags define the definition data. So the actual definition of the terms are enclosed in these tags.

Definition lists, again, are used most often when giving the definition of a certain term.

HTML Comment Box is loading comments...