HTML Guides for system identifier
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.
The doctype's public identifier and system identifier are written back to back, with no space between their two quoted strings.
Legacy doctypes from HTML 4.01 and XHTML 1.0 have two quoted strings after the PUBLIC keyword. The first is the public identifier, which names the DTD, such as "-//W3C//DTD XHTML 1.0 Transitional//EN". The second is the system identifier, the URL of that DTD. The HTML syntax requires whitespace between them, so a closing quote followed directly by an opening quote (//EN""http://) is a parse error. The same applies to single-quoted identifiers.
These doctypes are usually split across two lines, with the URL on the second line. A minifier or template that removes the line break without leaving a space produces this error.
Browsers recover from it: they still read both identifiers, so the page renders in the same mode as it would with the space. The legacy doctype itself is still reported, as "Almost standards mode doctype" or "Obsolete doctype". Adding a space clears this error only. Replacing the declaration with <!DOCTYPE html>, which has no identifiers, clears both.
Invalid example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Products</title>
</head>
<body>
<p>Hello</p>
</body>
</html>
Valid example
<!DOCTYPE html>
<html lang="en">
<head>
<title>Products</title>
</head>
<body>
<p>Hello</p>
</body>
</html>
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