-
-
: Defines a term in the list (dt = definition term)
-
: Defines a definition for a term (dd = definition list definition)
Creating a definition list with two items requires tags and content in the following order:
-
-
-
First term name
-
-
-
Content for the definition of the first item
-
-
-
Second term name
-
-
-
Content for the definition of the second item
-
-
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Definition Lists</title> </head> <body> <h1>Markup Language Definitions</h1> <dl> <dt>SGML</dt> <dd>The Standard Generalized Markup Language</dd> <dt>HTML</dt> <dd>The Hypertext Markup Language</dd> <dd>The markup language you use to create web pages.</dd> <dt>XML</dt> <dd>The Extensible Markup Language</dd> </dl> </body> </html>The figure shows how a browser displays this HTML.
If you think items in a list are too close together, you can use CSS styles to carefully control all aspects of list appearance.
Note that definition lists often display differently inside different browsers, and they aren’t always handled the same by search engines or text-to-speech translators. About.com has a nice discussion of definition lists on their Web Design / HTML page.Alas, this means that definition lists may not be the best choice of formatting for lists you create (even lists of definitions). For a more detailed discussion, see the excellent coverage of this topic on Max Design.