HTML Validation
HTML Guides for mailto
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
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>
Ready to validate your sites?
Start your free trial today.