Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Description List
Description Lists

DL Lists are used to display lists of items along with description and dl stands for description list. Each item is denoted by <dt> and dt stands for description term and each item is described by <dd>, dd stands for description definition.

Syntax

<dl>
<dt>Item 1</dt>
<dd>Description</dt>
<dt>Item 2</dt>
<dd>Description</dt>
</dl>


You can use dl lists any where within an HTML document.


Example

Computer
it is made up of hardware and software
Water
it is made up of Hydrogen and Oxigen gases

Note:

dl has no type but it has indent.


Description list is a pair tag and output of dl element is list of elements along with description like you can see in above example.


Practice Task

Open notepad or any other text editor, follow the following points.


  • Select your items
  • Create one dl list
  • Now add only two items in list
  • Items names and description should be any as per your choice

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

Soap
One soap is 50 rupees
Sugar
it is made up of sugarcan

Don't forget dl is non empty element which means it always comes in pair.