webdevlinux - logo Web Dev Linux

HTML Description Lists

Description lists are useful when we need to describe a list of something. In this chapter, you will understand how to use description lists in an HTML document.

HTML Description Lists Description Lists Elements

Permitted child elements of a dl element are  dt and dd elements only. As contents of a dl element, there can be exist one or more dt elements, followed by one or more dd elements.

Try the below example of all possible ways of use description lists.

FILE : description-list.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML Description Lists</title>
</head>
<body>
<dl>
	<dt>Title 1</dt>
	<dd>Description of Title 1</dd>
	<dt>Title 2</dt>
	<dd>Description of Title 2</dd>
	<dd>Another Description of Title 2</dd>
	<dt>Title 3</dt>
	<dt>Similar term of Title 3</dt>
	<dd>Description of Title 3</dd>
	<dt>Title 4</dt>
	<dt>Similar term of Title 4</dt>
	<dd>Description of Title 4</dd>
	<dd>Another Description of Title 4</dd>
</dl>
</body>
</html>

Unlike in ordered and unordered lists, There are no bullets or numbers in a description list.