Skip to main content
HTML Validation

Bad value X for attribute “href” on element “a”: Illegal character in path segment

About This HTML Issue

The href attribute of an <a> element contains an invalid character, that should be properly encoded as a URI percent-encoded character.

Last reviewed: July 14, 2025

Was this guide helpful?

Find issues like this automatically

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

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