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

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

A `tel:` URI in an `href` attribute must not contain spaces. The phone number should be written as a continuous string of digits, optionally prefixed with `+` for the country code.

The `tel:` URI scheme is defined in [RFC 3966](https://www.rfc-editor.org/rfc/rfc3966). It allows digits, hyphens, dots, and parentheses as visual separators, but spaces are not permitted. Browsers may still dial the number if spaces are present, but the markup is technically invalid.

A common approach is to use the full international number with no spaces in the `href` value while keeping a human-readable format in the visible link text. If you want visual separators in the `href`, use hyphens or dots instead of spaces.

## Invalid example

```html
<a href="tel:+1 555 123 4567">Call us</a>
```

## Valid examples

```html
<a href="tel:+15551234567">+1 555 123 4567</a>

<a href="tel:+1-555-123-4567">+1 555 123 4567</a>
```
