If you use
<a href="//x.invalid"> for test links, they will always remain unvisited. The
.invalid TLD is standardized to never have its DNS resolve, so the browser can never consider it visited.
It’s more unwieldy than
# but sometimes you need a link that just won’t ever be visited.