# Bad value “mailto:X>” for attribute “href” on element “a”: Illegal character in scheme data: “<” is not allowed.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-mailto-x-for-attribute-href-on-element-a-illegal-character-in-scheme-data-is-not-allowed
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

A `<` character inside an `href` attribute is not valid in a URL and must be removed or percent-encoded.

The `mailto:` URL scheme expects a well formed email address directly after the colon, such as `mailto:user@example.com`. The angle brackets (`<` and `>`) sometimes seen around email addresses in mail headers or plain text are not part of the URL syntax. Including them in the `href` value produces an illegal character error because `<` and `>` are not permitted in URIs without percent-encoding.

If angle brackets appear in your markup, they likely got there by copying an address from an email header like `From: User <user@example.com>` and pasting the whole thing into the link. Strip the brackets so only the bare address remains.

## HTML examples

### Incorrect

```html
<a href="mailto:<user@example.com>">Email us</a>
```

### Correct

```html
<a href="mailto:user@example.com">Email us</a>
```
