About This HTML Issue
Use xmlns="http://www.w3.org/1999/xhtml", not http://www.w3.org/1999/html.
The xmlns attribute specifies the XML namespace. For XHTML documents, the only valid value is http://www.w3.org/1999/xhtml. Using http://www.w3.org/1999/html is incorrect and causes validation errors. For regular HTML5 (not XHTML), you do not need the xmlns attribute at all.
Correct XHTML Example:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>XHTML Example</title>
</head>
<body>
<p>Hello, XHTML world!</p>
</body>
</html>
Correct HTML5 Example (no xmlns attribute):
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML5 Example</title>
</head>
<body>
<p>Hello, HTML5 world!</p>
</body>
</html>
For XHTML, always use xmlns="http://www.w3.org/1999/xhtml". For regular HTML5, omit the xmlns attribute.
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.
Learn more:
Help us improve our guides
Was this guide helpful?