Skip to main content
HTML Validation

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

About This HTML Issue

A space character in the email address within the mailto: link is invalid syntax.

The href attribute on an <a> tag must contain a valid email address after mailto: in order to conform to HTML standards. Email addresses cannot contain spaces. Including a space (as in user@example com) results in invalid markup.

Correct usage:
Remove any spaces from the email address and use a correctly formatted address such as user@example.com.

Invalid example

<a href="mailto:user@example com">Send Email</a>

Valid example

<a href="mailto:user@example.com">Send Email</a>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?

Ready to validate your sites?
Start your free trial today.