Skip to main content
HTML Validation

Bad value X for attribute “href” on element “a”: Illegal character in fragment: “>” is not allowed.

About This HTML Issue

The href attribute in the a tag uses an invalid character, as > is not allowed in URL fragments.

According to the HTML standard and URL syntax, fragment identifiers (the part after #) can only contain certain characters. The > character is not permitted and must be removed or percent-encoded. If the > is unintentional, simply omit it; if it must be included as part of the fragment, encode it as %3E.

Original HTML (invalid):

<a href="/page.php>">Read more</a>

Corrected HTML (if > should not be present):

<a href="/page.php">Read more</a>

Corrected HTML (if > is required in fragment, encode it):

<a href="/page.php%3E">Read more</a>

Last reviewed: July 24, 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.