dl element

If you don't know what an element is or how you must use it, I recommend you read the "HTML tags and attributes" tutorial that you can find in the HTML tutorials section.

Description

The dl element represents a description list. These lists, that put toghether names (dt) and values (dd), can be used for different purposes like metadata topics and values, questions and answers, glossaries, vocabulary lists, etc.

In name-value lists, there could be more than one term for a single definition and viceversa. These variants are arbitrary and left to the author's consideration.

A name-value group, composed by any number of names (dt) followed by any number of values (dd), can be optionally enclosed in a div element. This is useful to assign common attributes or style information to the whole group.

Examples

Our first example consist of an ADHD Q&A list represented by the elements dl, dt and dd. The questions are associated to the answers by their positions in the list.

<h1>ADHD Q&amp;A</h1>
<dl>
  <dt>Can a child have an attention deficit disorder and not be hyperactive?</dt>
  <dd>Yes. This is known as ADHD, Predominantly Inattentive presentation. Children with this presentation will often daydream and have a hard time focusing.</dd>
  <dt>Is there a specific test to diagnose ADHD?</dt>
  <dd>No, there is not one magic test. But professionals qualified in assessing children's development and behavior will conduct a comprehensive assessment to ascertain whether the individual does indeed have the disorder.</dd>
  <dt>Has the outpouring of media attention paid to ADHD affected how frequently and accurately patients are diagnosed with the disorder?</dt>
  <dd>Some families develop preconceived notions that their children may have ADHD and come to health professionals expecting a confirmation of their home diagnosis. That can cause some problems, particularly if parents are attached to the idea and begin 'shopping around' until they find someone who confirms the diagnosis.</dd>
</dl>

ADHD Q&A

Can a child have an attention deficit disorder and not be hyperactive?
Yes. This is known as ADHD, Predominantly Inattentive presentation. Children with this presentation will often daydream and have a hard time focusing.
Is there a specific test to diagnose ADHD?
No, there is not one magic test. But professionals qualified in assessing children's development and behavior will conduct a comprehensive assessment to ascertain whether the individual does indeed have the disorder.
Has the outpouring of media attention paid to ADHD affected how frequently and accurately patients are diagnosed with the disorder?
Some families develop preconceived notions that their children may have ADHD and come to health professionals expecting a confirmation of their home diagnosis. That can cause some problems, particularly if parents are attached to the idea and begin 'shopping around' until they find someone who confirms the diagnosis.

In the second example, we define a glossary. Again, the terms are represented by dt and the definitions by dd.

<h1>Internet and computers glossary</h1>
<dl>
  <dt>Wireless access point</dt>
  <dd>A device that allows wireless devices to connect to a wired network using Wi-Fi, or related standards. The AP usually connects to a router (via a wired network) as a standalone device, but it can also be an integral component of the router itself.</dd>
  <dt>Bandwidth</dt>
  <dd>A measurement of bit-rate of available or consumed data communication resources expressed in bits per second or multiples of it (bit/s, kbit/s, Mbit/s, Gbit/s, etc.).</dd>
  <dt>Firewall</dt>
  <dd>A software or hardware-based network security system that controls the incoming and outgoing network traffic based on applied rule set. A firewall establishes a barrier between a trusted, secure internal network and another network (e.g., the Internet) that is not assumed to be secure and trusted.</dd>
</dl>

Internet and computers glossary

Wireless access point
A device that allows wireless devices to connect to a wired network using Wi-Fi, or related standards. The AP usually connects to a router (via a wired network) as a standalone device, but it can also be an integral component of the router itself.
Bandwidth
A measurement of bit-rate of available or consumed data communication resources expressed in bits per second or multiples of it (bit/s, kbit/s, Mbit/s, Gbit/s, etc.).
Firewall
A software or hardware-based network security system that controls the incoming and outgoing network traffic based on applied rule set. A firewall establishes a barrier between a trusted, secure internal network and another network (e.g., the Internet) that is not assumed to be secure and trusted.

Lastly we'll show an example of a vocabulary reference where one definition is declared for two terms ("theater" and "theatre") and one term ("film") gets two definitions.

<h1>Vocabulary reference</h1>
<dl>
  <dt>Theater</dt>
  <dt>Theatre</dt>
  <dd>A collaborative form of fine art that uses live performers to present the experience of a real or imagined event before a live audience in a specific place. The performers may communicate this experience to the audience through combinations of gesture, speech, song, music, and dance.</dd>
  <dt>Film</dt>
  <dd>A strip or sheet of transparent plastic film base coated on one side with a gelatin emulsion containing microscopically small light-sensitive silver halide crystals. The sizes and other characteristics of the crystals determine the sensitivity, contrast and resolution of the film.</dd>
  <dd>A series of still images which, when shown on a screen, creates the illusion of moving images due to the phi phenomenon. This optical illusion causes the audience to perceive continuous motion between separate objects viewed rapidly in succession.</dd>
</dl>

Vocabulary reference

Theater
Theatre
A collaborative form of fine art that uses live performers to present the experience of a real or imagined event before a live audience in a specific place. The performers may communicate this experience to the audience through combinations of gesture, speech, song, music, and dance.
Film
A strip or sheet of transparent plastic film base coated on one side with a gelatin emulsion containing microscopically small light-sensitive silver halide crystals. The sizes and other characteristics of the crystals determine the sensitivity, contrast and resolution of the film.
A series of still images which, when shown on a screen, creates the illusion of moving images due to the phi phenomenon. This optical illusion causes the audience to perceive continuous motion between separate objects viewed rapidly in succession.

Attributes

Global attributes

For information about global attributes refer to this list of global attributes in HTML5.

Events

Global events

For information about global events refer to this list of global events in HTML5.

X

Are you looking for a place to host your next website? I can help you with that!