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

> Canonical HTML version: https://rocketvalidator.com/html-validation/attribute-with-the-local-name-xmlns-inkscape-is-not-serializable-as-xml-1-0
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Namespaced attributes like `xmlns:inkscape` are not valid in HTML5 documents and should be removed from inline SVGs.

When you copy an SVG directly from editors like Inkscape or Adobe Illustrator, the markup often includes custom namespace declarations such as `xmlns:inkscape` or `xmlns:sodipodi`. These namespaces are used internally by the editor to store metadata like layer names, version info, and other tool-specific data.

In an HTML5 document, the HTML parser only recognizes a limited set of namespaces — specifically `xmlns`, `xmlns:xlink`, and the default SVG namespace. Any other namespaced attributes are not serializable as XML 1.0, which triggers this validation error.

The fix is straightforward: remove the editor-specific namespace declarations and any attributes that use those prefixes (e.g., `inkscape:version`, `sodipodi:docname`). These attributes serve no purpose in the browser and are safe to delete.

## HTML Examples

### ❌ Invalid: editor-specific namespaces in inline SVG

```html
<svg xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.0.dtd"
  inkscape:version="1.3"
  sodipodi:docname="icon.svg"
  width="100" height="100" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="blue" />
</svg>
```

### ✅ Valid: clean inline SVG without editor namespaces

```html
<svg xmlns="http://www.w3.org/2000/svg"
  width="100" height="100" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="blue" />
</svg>
```

Most SVG optimization tools like [SVGO](https://github.com/svg/svgo) or [Jake Archibald's SVGOMG](https://jakearchibald.github.io/svgomg/) will automatically strip these editor-specific namespaces and attributes for you.
