HTML Guides for line break
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.
This mailto: link has a line break inside its href, and a URL can't contain a raw line break.
It usually happens when the attribute value is split across two lines in the source, often right after mailto:, by a template, a CMS field or an editor that wraps long lines. The validator says the line break comes "after ilto:", which means anywhere after the scheme: right after the colon, inside the address, or after the comma between two recipients. Indentation on the next line doesn't change the message, and an encoded line break such as triggers it too.
A line break at the very start or end of the value isn't reported, because leading and trailing whitespace is stripped from URLs. A line break inside the subject or body parameters gets a different message, "Tab, new line or carriage return found." To put a line break in the message body, encode it as %0D%0A.
Browsers remove line breaks from URLs before following them, so the link often still works, but the markup is invalid. Keep the whole mailto: URL on one line with no whitespace in it. If the tag gets too long, break the line between attributes instead of inside the value.
Invalid example
<a href="mailto:
info@example.com">Email us</a>
Valid example
<a class="contact-link"
href="mailto:info@example.com">Email us</a>
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.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries