# Duplicate “dt” name “X” in “dl” element. Within a single “dl” element, there should not be more than one “dt” element for each name.

> Canonical HTML version: https://rocketvalidator.com/html-validation/duplicate-dt-name-x-in-dl-element-within-a-single-dl-element-there-should-not-be-more-than-one-dt-element-for-each-name
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Within a `<dl>`, each name should appear in only one `<dt>`, so a term with several values gets one `<dt>` followed by several `<dd>` elements.

A description list is a set of name-value groups, and the HTML specification says a single `<dl>` should not have more than one `<dt>` for each name. When the same term shows up twice with different values, readers can't tell whether the second entry replaces the first, adds to it, or is a mistake. Repeated terms often come from lists built from data, such as product specifications where one attribute is output twice.

The validator compares the text content of each `<dt>`. It ignores markup and leading or trailing whitespace, so `<dt><b>Size</b></dt>` and `<dt> Size </dt>` both count as `Size`. The comparison is case-sensitive, so `Size` and `size` are different names. Wrapping each group in a `<div>` doesn't help, because the check covers the whole `<dl>`. Along with this warning, the validator adds a second message pointing to the first `<dt>` with that name.

If both values belong to the same term, keep one `<dt>` and put each value in its own `<dd>`. If the entries describe different things that share a label, give each `<dt>` a distinct name, or move them into separate `<dl>` elements, since the rule applies only within a single list.

## Invalid example

```html
<dl>
  <dt>Size</dt>
  <dd>Small</dd>
  <dt>Color</dt>
  <dd>Red</dd>
  <dt>Size</dt>
  <dd>Medium</dd>
</dl>
```

## Valid example

```html
<dl>
  <dt>Size</dt>
  <dd>Small</dd>
  <dd>Medium</dd>
  <dt>Color</dt>
  <dd>Red</dd>
</dl>
```

## Valid example with distinct names

```html
<dl>
  <dt>Net weight</dt>
  <dd>1.2 kg</dd>
  <dt>Gross weight</dt>
  <dd>1.4 kg</dd>
</dl>
```
