Skip to main content
HTML Validation

Attribute “xmlns:w” not allowed here.

About This HTML Issue

The xmlns:w attribute is not allowed on the html element in HTML5.

HTML5 only permits the xmlns attribute for declaring the default XML namespace on the root element in XML documents, such as XHTML—not in HTML. Custom XML namespaces like xmlns:w are not valid in HTML and will cause errors in validators. This attribute is typically used in Microsoft Office-generated HTML for Word-specific XML elements, which are not part of standard HTML and should be removed for web compatibility.

If you are writing standard HTML, simply remove the xmlns:w attribute from your html tag.

Incorrect example (causes the error):

<!DOCTYPE html>
<html lang="en" xmlns:w="urn:schemas-microsoft-com:office:word">
  <head>
    <title>Invalid HTML Example</title>
  </head>
  <body>
<!-- Content here -->

  </body>
</html>

Correct example:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Valid HTML Example</title>
  </head>
  <body>
<!-- Content here -->

  </body>
</html>

To ensure W3C compliance, do not include custom XML namespace declarations in HTML5 documents.

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?

Ready to validate your sites?
Start your free trial today.