# Bad value X for attribute “version” on element “svg”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-x-for-attribute-version-on-element-svg
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `version` attribute on the `<svg>` element is obsolete in SVG 2 and is no longer recognized as a valid attribute by the W3C HTML validator.

The `version` attribute was used in SVG 1.0 and SVG 1.1 to indicate which specification the SVG content conformed to, with values like `"1.0"` or `"1.1"`. However, SVG 2 — which is the version used when SVG is embedded in HTML5 documents — dropped this attribute entirely. It never had any practical effect on how browsers rendered SVG content, so removing it is safe and has no impact on functionality.

Similarly, the `baseProfile` attribute and the `xmlns:xlink` namespace declaration are also obsolete when using inline SVG in HTML5. You can safely remove all three.

## Bad Example

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

## Fixed Example

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

If your SVG files are exported from tools like Illustrator, Inkscape, or Figma, they often include the `version` attribute by default. You can safely strip it out manually or use an SVG optimizer like [SVGO](https://github.com/svg/svgo) to clean up unnecessary attributes automatically.
