← All Exercises

Build a Glossary with Description Lists

basichtml~15min

Background

Description lists express term and definition pairs; generic paragraphs or tables lose that relationship for assistive technology.

Problem

Create a glossary of three web terms using a description list, marking each term with dfn and grouping each term and definition pair inside a div wrapper.

Input

Three terms with one-paragraph definitions.

Output

A dl with three grouped dt and dd pairs.

Sample tests

Sample 1

Input: Screen reader reads a glossary entry
Expected: the dt announces the term and the following dd is read as its description

Sample 2

Input: Developer validates the markup
Expected: dl contains div wrappers, each holding one dt with dfn and one dd, with no bare p children

Your solution

Learning objective

Use dl, dt, dd, and dfn to make glossary pairs machine-readable and navigable.