Which list is a list of terms followed by the description?

DL - Definition Lists

Permitted Context: %Body.Content, %flow, %block
Content Model: Optional list header(LH), followed by one or more terms(DT) and definitions(DD).

A definition list is a list of terms and corresponding definitions. Definition lists are typically formatted with the term on the left with the definition following on the right or on the next line. The definition text is typically indented with respect to the term.

An alternative format places the term left aligned in a wide margin and the definition on one or more lines to the right of the term. If the DT term does not fit in the DT column (one third of the display area), it may be extended across the page with the DD section moved to the next line, or it may be wrapped onto successive lines of the left hand column.

The opening list tag must be <DL>. It is followed by an optional list header (<LH>caption</LH>) and then by term names (<DT>) and definitions (<DD>). For example:

<DL> <LH>List Header</LH> <DT>Term 1<dd>This is the definition of the first term. <DT>Term 2<dd>This is the definition of the second term. </DL>

which could be rendered as:

List Header

Term 1This is the definition of the first term.Term 2This is the definition of the second term.

The definition list element can take the COMPACT attribute, which suggests that a compact rendering be used, and is appropriate if the list elements are small and/or the entire list is large.

Note: Use the NOTE element when you want to have an indented note. The practice of using <DD> elements without corresponding <DT> elements is deprecated.

Permitted Attributes for the DL Element

IDAn SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Identifiers are NAME tokens and must be unique within the scope of the current document.LANGThis is one of the ISO standard language abbreviations, e.g. "en.uk" for the variation of English spoken in the United Kingdom. It can be used by parsers to select language specific choices for quotation marks, ligatures and hypenation rules etc. The language attribute is composed from the two letter language code from ISO 639, optionally followed by a period and a two letter country code from ISO 3166.CLASSThis a space separated list of SGML NAME tokens and is used to subclass tag names. By convention, the class names are interpreted hierarchically, with the most general class on the left and the most specific on the right, where classes are separated by a period. The CLASS attribute is most commonly used to attach a different style to some element, but it is recommended that where practical class names should be picked on the basis of the element's semantics, as this will permit other uses, such as restricting search through documents by matching on element class names. The conventions for choosing class names are outside the scope of this specification.CLEARThis attribute is common to all block-like elements. When text flows around a figure or table in the margin, you sometimes want to start an element like a header, paragraph or list below the figure rather than alongside it. The CLEAR attribute allows you to move down unconditionally:

clear=leftmove down until left margin is clearclear=rightmove down until right margin is clearclear=allmove down until both margins are clear

Alternatively, you can decide to place the element alongside the figure just so long as there is enough room. The minimum width needed is specified as:

clear="40 en"move down until there is at least 40 en units freeclear="100 pixels"move down until there is at least 100 pixels free

The style sheet (or browser defaults) may provide default minimum widths for each class of block-like elements.

COMPACTThe presence of this attribute indicates the user agent should use reduced interitem spacing. The COMPACT attribute may also reduce the width of the left-hand (DT) column.

In practice, there are several ways to increase the compactness of lists: reduced vertical interitem spacing, smaller font size, or even to avoid line breaks between items. This is best handled through associated style sheets and the class attribute.

The opening list tag must be DL COMPACT. It must be immediately followed by the first term (DT). For example:

<DL compact> <DT>Term<DD>This is the first definition in compact format. <DT>Term<DD>This is the second definition in compact format. </DL>

10 Lists

Contents

  1. Introduction to lists
  2. Unordered lists (UL), ordered lists (OL), and list items (LI)
  3. Definition lists: the DL, DT, and DD elements
    1. Visual rendering of lists
  4. The DIR and MENU elements

So what is a definition list?

Simply put it is a list of definitions. For the unabridged version read therelevant section in the HTML specification. Basically a definition list is composed of three HTML elements and some text. These are the <dl>, <dt> and <dd> elements.

<DL>A definition list is the container element for DT and DD elements. The DL element should be used when you want to incorporate a definition of a term in your document, it is often used in glossaries to define many terms, it is also used in “normal” documents when the author wishes to explain a term in a more detail (Like this definition).<DT>The term currently being defined in the definition list. This element contains inline data.<DD>The definition description element contains data that describes a definition term. This data may be either inline, or it may be block level.

HTML Lists

In this tutorial you will learn how to create different types of lists in HTML.

Use Definition Lists for Detailed Steps

A definition list is a list of terms (or numbers) and corresponding definitions or descriptions. We like using definition lists in our articles to give readers a clear view of the steps required to complete a task, but just about anything fits in a list. This article will teach you how to use definition lists in Docs.

In this article

  • Creating Lists in the HTML Editor
  • Common Questions

Creating Lists in the HTML Editor

The definition list element ( <dl>) contains a term (<dt>) and a description (<dd>). To create your list, you can either:

  • Write list content in the text editor, then hop over to the HTML editor by clicking the </> icon on the toolbar to markup the list.
  • Write list content entirely in the HTML editor, enclosing text in the list as you go.

Check out the list below and take a look at how it's marked-up in HTML. The step number is our definition term <dt> and the corresponding instruction text is the definition description <dd>.

1I call it luck. I care. So, what do you think of her, Han? She must have hidden the plans in the escape pod. Send a detachment down to retrieve them, and see to it personally, Commander.2The Force is strong with this one. I have you now. Your eyes can deceive you. Don't trust them. I'm surprised you had the courage to take the responsibility yourself.<dl> <dt>1</dt> <dd>I call it luck. I care. So, what do you think of her, Han? She must have hidden the plans in the escape pod. Send a detachment down to retrieve them, and see to it personally, Commander.</dd> <dt>2</dt> <dd>The Force is strong with this one. I have you now. Your eyes can deceive you. Don't trust them. I'm surprised you had the courage to take the responsibility yourself.</dd> </dl>

Note: By default, the number background in a definition list is grey. We're using custom CSS to make our number background blue. If you're using your own stylesheet, you can change the term background color with:

#fullArticle dt { background: #3197D1; }

Common Questions

Will lists work in all browsers?
Definition lists are supported in Chrome, Firefox, Safari, Opera, Internet Explorer, and Edge.

Description Lists

The HTML Beginner Tutorial looked at unordered lists and ordered lists, but, much like Peter Cushing’s Doctor Who, description lists are quite often forgotten. This is maybe because they are much more specific than ordered and unordered lists and therefore less useful, generally, but where there is a list of terms and descriptions (such as a glossary), a description list is your go-to-element.

dl gets the ball rolling, similar to the ul and ol elements, establishing the list. Rather than containing li elements, though, description lists have dt elements, which are the terms, followed by dd elements, which are the descriptions associated to the dt elements.

There doesn’t have to be one dt followed by one dd, there can be any number of either. For example, if there are a number of words that have the same meaning, there might be a number of dt’s followed by one dd. If you have one word that means various different things, there might be one dt followed by several dd’s.

<h2>Some random glossary thing</h2> <dl> <dt>HTML</dt> <dd>Abbreviation for HyperText Markup Language - a language used to make web pages.</dd> <dt>Dog</dt> <dd>Any carnivorous animal belonging to the family Canidae.</dd> <dd>The domesticated sub-species of the family Canidae, Canis lupus familiaris.</dd> <dt>Moo juice</dt> <dt>Cat beer</dt> <dt>Milk</dt> <dd>A white liquid produced by cows and used for human consumption.</dd> </dl>

Which list is a list of terms followed by the description?
Link To Us! If you've found HTML Dog useful, please consider linking to us.