: Is link a broken link? When using empty URL fragment links, to send a user to the top of the page (e.g. <a href="#">return to top</a>), are these links considered broken or invalid?
When using empty URL fragment links, to send a user to the top of the page (e.g. <a href="#">return to top</a>), are these links considered broken or invalid? One of my tools is returning them all as broken links.
More posts by @Shelton105
2 Comments
Sorted by latest first Latest Oldest Best
Technically, "#" is a well-defined URL reference that points to the start of the current document, so it is not “broken” in formal sense. It can, however, be regarded as bad for accessibility, and it is also a common symptom of “fake” links, i.e. a elements that are supposed to link to something external but depend on JavaScript. (In the very old days, <a href="..." onclick="..."> was the only kind of element that supported the onclick attribute, so people wrote the “dummy” href="#" attribute, which isn’t really dummy.)
So you can regard this as an incorrect error message, or as a useful warning message that might be a little poorly formulated.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.