4.4. Definition Lists
Definition lists seem more complex than the other two lists due to their having two elements per list item. However, the sparse number of options available for definition lists makes them easy to implement.
The definition list itself is encapsulated within definition list tags (<dl>). The list items consist of a definition term (<dt>) and definition (<dd>), each delimited by its own tag pair.
For example, the following code results in the document shown in Figure 4-6:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html> <head> <title>Example Definition List</title> </head> <body> <p> <dl> <dt>Internet Explorer</dt> <dd>Developed by Microsoft, an integral piece of Windows products.</dd> <dt>Mozilla</dt> <dd>Developed by the Mozilla Project, an open source browser for multiple platforms.</dd> <dt>Netscape</dt> <dd>Developed by Netscape Communications Corporation, one of the first graphical browsers.</dd> <dt>Safari</dt> <dd>Developed by Apple Computer, Inc, for Apple's OSX operating system.</dd> <dt>Firefox</dt> <dd>A "next generation" open source browser developed by Mozilla and available on multiple platforms.</dd> </dl> </p> </body> </html>
Figure 4-6. Figure 4-6
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.