Skip to main content

HTML Guide

Attribute with the local name “xmlns:w” is not serializable as XML 1.0.

Using the attribute xmlns:w="urn:schemas-microsoft-com:office:word" in HTML is invalid because custom XML namespace declarations are not allowed in HTML5.

HTML5 does not support custom namespaces like xmlns:w, which are used in XML-based formats such as XHTML or Office documents, but not in regular HTML. The HTML parser ignores unknown attributes and does not treat them as namespaces, which can result in validation errors. Only predefined namespaces allowed by the HTML specification (such as the default for SVG or MathML) are supported via the appropriate embedding elements.

Correct HTML Example Without Custom Namespace:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>No Custom Namespace Example</title>
  </head>
  <body>
    <p>Custom XML namespaces like <code>xmlns:w</code> are not valid in HTML5.</p>
  </body>
</html>

Incorrect Example That Causes the Error:

<html xmlns:w="urn:schemas-microsoft-com:office:word">
  <!-- ... -->
</html>

To fix the error, remove the xmlns:w attribute from your HTML. If you need to use Office-specific features or XML namespaces, use an appropriate XML-based format (such as XHTML or OOXML), but not standard HTML5.

Related W3C validator issues