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

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

An `href` value that starts with a word and a colon, such as `Facebook: My Page`, is read as a URL whose scheme is that word, and a URL can't have a space right after its scheme.

In a URL, everything before the first colon is the scheme (`https`, `mailto`, `sms`). The validator reads `Facebook: My Page` as a URL with the scheme `facebook`, then stops at the space that follows the colon. It quotes the scheme in lowercase, and for some known schemes only its last letters, so `data:` shows up as `“ta:”`.

The usual cause is a label pasted into the wrong field: a CMS or template puts the link text ("Facebook: My Page", "Phone: 555 0100") in the `href` instead of the address. Browsers treat such a value as an unknown scheme, so the link does nothing or opens a broken page. Put the real URL in `href` and keep the label as the link text.

If the value is a real URL with a stray space after the colon, like `sms: +15550100`, remove the space.

## Invalid example

```html
<p>
  <a href="Facebook: Example Guest House">Facebook</a>
  <a href="sms: +15550100">Send us a text</a>
</p>
```

## Valid example

```html
<p>
  <a href="https://social.example.com/exampleguesthouse">Example Guest House on Facebook</a>
  <a href="sms:+15550100">Send us a text</a>
</p>
```
