Skip to main content
HTML Validation

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

About This HTML Issue

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.

Last reviewed: May 12, 2025

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

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