Previous task
Text markup with HTML6/10
Back to the list of tasks
  1. 1. Paragraphs
  2. 2. Headings and subheadings
  3. 3. Unordered list
  4. 4. Ordered list
  5. 5. Multilevel list
  6. 6. Description List
  7. 7. Strong and b tags
  8. 8. Em and i tags
  9. 9. Line breaks and separators
  10. 10. Preformatted text
Nest task
  • Courses
  • Sign up
  • Log in

Loading...
It will be ready in a few seconds.

  • Theory
  • Theory

Description List

A list of descriptions is created using three tags:

  1. <dl> represents the description list itself;
  2. <dt> represents a term;
  3. <dd> represents the description of the term.

The <dt> and <dd> tags are written in pairs inside <dl>.

For example:

<dl>
  <dt>Term</dt>
  <dd>Description</dd>

  <dt>Second term</dt>
  <dd>And its description</dd>

  <dt>Cat</dt>
  <dd>Woolly lord of the house</dd>
</dl>
  • index.html
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Description List</title> </head> <body> <h1>Deciphering list tags</h1> <dl> <dt>dl</dt> <dd>The description list itself</dd> <dt>dt</dt> <dd>Description Term</dd> <dt>dd</dt> <dd>Description Details</dd> </dl> </body> </html>

The code has changed, click "Update" or enable autorun.

You have moved to another page

Click inside the mini-browser to highlight this window.

100%
GoalsCompleted
0

    To the existing list of descriptions, add:

    1. Fourth element with the term ul and the description of Unordered List.
    2. Fifth item with the term li and the description of List Item.

    © 2023-2024, codehero.pro