HTML Guides for duplicate
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
A document can have only one meta element with http-equiv="content-type", so keep a single encoding declaration and delete the rest.
<meta http-equiv="content-type" content="text/html; charset=utf-8"> is the older way to declare a page's character encoding. HTML treats it as an encoding declaration, just like <meta charset="utf-8">, and a document may contain only one. The validator reports an error for every extra copy, even when all of them say utf-8. It also ignores case in the http-equiv value, so Content-Type and content-type count as the same declaration.
Duplicates usually come from templates. A base layout writes the declaration, then a partial or a plugin adds it again further down the head. Find every copy in the rendered page, keep the first one and delete the others.
You can also swap the one you keep for the shorter <meta charset="utf-8"> and put it first in the head, so it sits within the first 1024 bytes of the document. Don't keep both forms, though: the validator rejects a meta charset next to a meta http-equiv="content-type" with a different error.
Invalid example
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Products</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hello</p>
</body>
</html>
Valid example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Products</title>
</head>
<body>
<p>Hello</p>
</body>
</html>
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
<dl>
<dt>Size</dt>
<dd>Small</dd>
<dt>Color</dt>
<dd>Red</dd>
<dt>Size</dt>
<dd>Medium</dd>
</dl>
Valid example
<dl>
<dt>Size</dt>
<dd>Small</dd>
<dd>Medium</dd>
<dt>Color</dt>
<dd>Red</dd>
</dl>
Valid example with distinct names
<dl>
<dt>Net weight</dt>
<dd>1.2 kg</dd>
<dt>Gross weight</dt>
<dd>1.4 kg</dd>
</dl>
This message points to the first <dt> in a <dl> whose name is repeated later in the same list.
It always comes with a duplicate dt name warning on the later <dt>. Together, the two messages show where each copy of the term is, so you can compare them and decide which one to keep. The HTML specification says a single <dl> should not have more than one <dt> for each name.
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> have the same name. The comparison is case-sensitive, so Size and size don't clash.
The first <dt> is usually fine on its own; the fix goes where the name repeats. If both entries describe the same term, keep one <dt> and give each value its own <dd>. If they describe different things, give each <dt> a distinct name. Once every name in the list is unique, both messages go away.
Invalid example
<dl>
<dt>Size</dt>
<dd>Small</dd>
<dt>Color</dt>
<dd>Red</dd>
<dt>Size</dt>
<dd>Medium</dd>
</dl>
Valid example
<dl>
<dt>Size</dt>
<dd>Small</dd>
<dd>Medium</dd>
<dt>Color</dt>
<dd>Red</dd>
</dl>
Validate at scale.
Ship accessible websites, faster.
Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries