Skip to main content
HTML Validation

No space between the doctype public and system identifiers.

About This HTML Issue

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>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
๐ŸŒ Trusted by teams worldwide

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.

Scheduled Reports
API Access
Open Source Standards
โ‚ฌ5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly โ†’

Join teams across 40+ countries