Definition Lists

Welcome to our free HTML tutorial. This tutorial is based on Webucator's Introduction to HTML Training course.

Contact Us or call 1-877-932-8228
Definition Lists

Definition Lists

Definition Lists are not as widely used as unordered and ordered lists. The example below is taken from the W3C Recommendation . We've modified it to make it XHTML compliant.

Code Sample:

Lists/Demos/DefinitionList.html
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Definition List</title>
</head>
<body>
	<h1>Definition List</h1>
	<dl>
		<dt>Dweeb</dt>
		<dd>young excitable person who may mature into a 
			<em>Nerd</em> or <em>Geek</em></dd>
		<dt>Hacker</dt>
		<dd>a clever programmer</dd>
		<dt>Nerd</dt>
		<dd>technically bright but socially inept person</dd>
	</dl>
</body>
</html>

Code Explanation

The <dl> element contains the definition list. The <dt> elements are the definition terms and the <dd> elements are the definition descriptions. The screenshot below shows how the code will be rendered.Definition List

Next

This tutorial is based on Webucator's Introduction to HTML Training Course. We also offer many other HTML Training courses. Sign up today to get help from a live instructor.