HTML Guides for https
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 xmlns attribute has the XHTML namespace written with https://, but the only allowed value is http://www.w3.org/1999/xhtml.
A namespace name looks like a web address, yet no browser ever loads it. Parsers treat it as a fixed name and compare it character by character, so https://www.w3.org/1999/xhtml names a different namespace than the HTML one. The https usually slips in when a site moves to HTTPS. A search and replace across the templates, or a plugin that upgrades every http:// string, changes the namespace along with the real links. The SVG and MathML namespaces keep http:// too.
In a page served as text/html, the parser puts every element in the HTML namespace by itself, and the HTML standard says xmlns has no effect there, which is why the page still renders. The value matters once the same markup is parsed as XML, for example when it's served as application/xhtml+xml or run through XSLT. Its elements then land in an unknown namespace, and browsers and XML tools no longer treat them as HTML.
Change https back to http. In a page served as HTML you can delete the attribute instead, and keep it only if the same file also has to work as XHTML. If an HTTPS rewrite caused the change, exclude namespace names from it so the next run doesn't break them again.
Invalid example
<!DOCTYPE html>
<html xmlns="https://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Products</title>
</head>
<body>
<p>Our product range.</p>
</body>
</html>
Valid example
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Products</title>
</head>
<body>
<p>Our product range.</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