HTML Definition List 'dl' Tag/Element


What Is a "dl" Tag/Element?



A "dl" element is block level element that can be used to define a definition list, where items are displayed with leading terms. Here are basic rules about "dl" elements:

  • "dl" elements are block level elements.
  • "dl" elements can not have text contents.
  • An "dl" element must have one or more pairs of "dt" and "dd" elements as sub-elements.
  • Each pair of "dt" and "dd" elements will be displayed by browsers as a term and a definition.

Below is a good tutorial example of "dl" elements:

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  <title>Definition Lists</title>
  <dt>CSS</dt><dd>Cascading Style Sheet</dd>
  <dt>DTD</dt><dd>Document Type Definition</dd>
  <dt>WWW</dt><dd>World Wide Web</dd>
  <dt>XML</dt><dd>eXtensible Markup Language</dd>

If you save the above document as definition_list.html, and view it with Internet Explorer, you will see a list of items with leading terms as shown below:

HTML dl Element - Definition Lists
HTML dl Element - Definition Lists


HTML Nested List Elements

HTML Un-ordered List 'ul' Tag/Element

HTML Lists and List Items

⇑⇑ HTML Tutorials

2017-05-29, 2015🔥, 0💬