About This HTML Issue
A | (pipe) character in the fragment portion of a URL must be percent-encoded as %7C to be valid.
The href attribute on an <a> element must contain a valid URL. According to the URL specification, certain characters — including the pipe | — are not permitted as literal characters in a URL fragment (the part after #). The W3C validator flags this because the browser may handle it inconsistently, and it violates the URL standard.
To fix it, replace every | in the URL with its percent-encoded equivalent: %7C.
HTML Examples
❌ Invalid: literal pipe in fragment
<a href="https://example.com/page#section|one">Link</a>
✅ Valid: percent-encoded pipe in fragment
<a href="https://example.com/page#section%7Cone">Link</a>
If you control the target page, consider redesigning the fragment identifiers to avoid special characters altogether — for example, using hyphens or underscores like #section-one instead.
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.