Skip to main content

HTML Guide

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

The xmlns:m attribute is an XML namespace declaration and not valid on the html element in HTML documents.

HTML5 does not support custom XML namespaces; they are only used in XML-based languages such as XHTML. The global xmlns:* attributes like xmlns:m are not allowed on the <html> element in HTML documents that use the text/html MIME type. This causes serialization and validation errors, especially with W3C HTML validation.

To fix this, remove the xmlns:m attribute from the <html> tag. If you need to use a namespace, your document should be XHTML and served as application/xhtml+xml, not as regular HTML.

Incorrect HTML (causes validation error):

<html xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
  <head>
    <title>Invalid Namespace Example</title>
  </head>
  <body>
    <!-- Content -->
  </body>
</html>

Correct HTML (remove the namespace declaration):

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

If you require usage of MathML, SVG, or other XML vocabularies, HTML5 already supports them natively without explicit namespace declarations. For Microsoft Office Markup Language (OMML), use proper XML/XHTML serialization and the correct MIME type if absolutely necessary. For typical web content, avoid custom XML namespaces in HTML5.

Related W3C validator issues