# Bad value X for attribute “href” on element “a”: Illegal character after “ilto:”. “"” is not allowed.

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

The `href` value of a `mailto:` link contains a double quote (`"`), which the URL can only hold percent-encoded as `%22`.

The `ilto:` in the message is the tail of `mailto:`, and the check covers the whole address after it, so a `"` at the end of the address gets the same error as one at the start.

Usually the quotes were meant for the attribute and landed after the scheme, as in `<a href=mailto:"info@example.com">`. No quote follows the `=`, so HTML reads `mailto:"info@example.com"` as an unquoted value and copies both `"` characters into the URL. On that tag the validator also reports `“"” in an unquoted attribute value`. If a space follows the stray quote, the value ends at the space and the message shows only `mailto:"`. Without a closing quote, a single `"` stays in front of the address.

Quoting the address on purpose doesn't help. In `href='mailto:"info@example.com"'` and `href="mailto:&quot;info@example.com&quot;"`, the URL still starts with a literal `"` when the validator checks it. A display name in email header style, such as `mailto:"Jane Doe" <info@example.com>`, fails for the same reason: the URL holds only the address, and the name goes in the link text. For the rare address with a quoted local part, [RFC 6068](https://www.rfc-editor.org/info/rfc6068/) asks for the quotes as `%22`, as in `mailto:%22info%22@example.com`.

## Invalid example

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

## Valid example

```html
<a href="mailto:info@example.com">info@example.com</a>
```
