# Bad value X for the attribute “xmlns:link” (only “http://www.w3.org/1999/xlink” permitted here).

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-x-for-the-attribute-xmlns-link-only-http-www-w3-org-1999-xlink-permitted-here
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `xmlns:xlink` attribute on inline SVG accepts only one value, `http://www.w3.org/1999/xlink`.

The message calls the attribute `xmlns:link`, but the one to look for in your markup is `xmlns:xlink`. It declares the XLink namespace, which SVG 1.1 used for attributes such as `xlink:href`. A namespace URI is a fixed name that the browser never loads, so it has to match the specification character for character. A different year, a trailing slash, `https` instead of `http`, or a path segment rewritten by a build tool or a search and replace all trigger this error.

In an HTML document you don't need the declaration at all. The HTML parser puts `xlink:href` and the other `xlink:` attributes in the XLink namespace by itself, and SVG 2 lets you write plain `href` on `<use>`, `<image>` and `<a>`. Either correct the value or remove the attribute and switch `xlink:href` to `href`.

## Invalid example

```html
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/2000/xlink" viewBox="0 0 24 24" width="24" height="24">
  <use xlink:href="#icon-star"></use>
</svg>
```

## Valid example

Correct the namespace URI:

```html
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="24" height="24">
  <use xlink:href="#icon-star"></use>
</svg>
```

Or drop the declaration and use `href`:

```html
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
  <use href="#icon-star"></use>
</svg>
```
