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

> Canonical HTML version: https://rocketvalidator.com/html-validation/attribute-with-the-local-name-xmlns-sodipodi-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/)

The `xmlns:sodipodi` attribute is a namespace declaration left over from the Inkscape SVG editor and is not valid in HTML5 documents.

When you embed an SVG directly in HTML, the HTML5 parser only recognizes a limited set of namespace declarations. The `xmlns:sodipodi` namespace (along with others like `xmlns:inkscape`) is specific to Inkscape's internal SVG format and serves no purpose in the browser. The W3C validator flags it because it cannot be serialized as XML 1.0 within the HTML5 context.

Inkscape adds several custom namespaces and attributes to SVG files for its own editing purposes. These include `sodipodi:*` and `inkscape:*` namespaces, along with their associated attributes and elements. Browsers simply ignore them, so removing them has no effect on how the SVG renders.

The fix is straightforward: remove the `xmlns:sodipodi` declaration from the `<svg>` tag, and also remove any `sodipodi:*` attributes or `<sodipodi:*>` elements throughout the SVG.

## HTML Examples

### ❌ Invalid: SVG with Inkscape namespaces

```html
<svg xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  viewBox="0 0 100 100"
  sodipodi:docname="icon.svg">
  <sodipodi:namedview pagecolor="#ffffff" />
  <circle cx="50" cy="50" r="40" fill="blue"
    inkscape:label="Main Circle" />
</svg>
```

### ✅ Valid: Cleaned SVG without editor-specific namespaces

```html
<svg viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="blue" />
</svg>
```

If you frequently export SVGs from Inkscape, consider using the **"Plain SVG"** export option (`File → Save As → Plain SVG`) instead of the default "Inkscape SVG" format. You can also use tools like [SVGO](https://github.com/svg/svgo) or [SVG Cleaner](https://github.com/nicedoc/svgo) to automatically strip editor metadata before embedding.
