Skip to main content
HTML Validation

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

About This HTML Issue

The mailto: link in this href contains a < character, which is not allowed in a URL. It usually appears when an email is pasted in Name <address> form, or when two addresses are joined without a proper separator.

A mailto: URL holds one or more bare email addresses after the colon, nothing else. Angle brackets, spaces, and the Display Name <address> notation used by email clients are not valid URL characters, so the validator rejects the link at the first illegal character. An encoded space (%20) followed by a second copy of the address, as in this case, is a typical sign that a Name <address> string or a pair of addresses was copied straight into the attribute.

To fix it, keep only the address itself. Drop the display name and the angle brackets, and if the link targets several people, separate the addresses with commas.

Invalid example

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

Valid example

A single recipient needs only the bare address:

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

For more than one recipient, separate the addresses with commas:

<a href="mailto:info@example.com,research@example.com">Email us</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?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries