About This HTML Issue
A space in the href URL wasn’t percent-encoded, making the link invalid.
The href attribute must contain a valid URL. Spaces and certain characters are not allowed in URLs and must be percent-encoded. In paths and query strings, replace spaces with %20 (or use + only in application/x-www-form-urlencoded query values, not paths).
Prefer generating properly encoded URLs server-side or via encodeURI/encodeURIComponent in JS. For fragment-only links, use href="#id". Avoid unencoded spaces anywhere after the scheme (e.g., https: or mailto:).
HTML Examples
Invalid (reproduces the validator error)
<a href="https://example.com/files/My File.pdf">Download</a>
Fixed (spaces percent-encoded)
<a href="https://example.com/files/My%20File.pdf">Download</a>
Learn more:
Last reviewed: August 13, 2025
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.