Javascript:void(0) and # in href in HTML links

Both javascript:void(0) and # are commonly used in the href attribute of HTML links, but they have different meanings and purposes. In this article, we have explored both in depth with code examples.

Table of contents:

Javascript:void(0) and # in href in HTML linksCode Examples of Javascript:void(0) and #Advanced use-cases of Javascript:void(0) and #Javascript:void(0) and # in href in HTML links

javascript:void(0) is used to indicate that the link does not have a destination URL and that it...

 •  0 comments  •  flag
Share on Twitter
Published on March 25, 2023 17:22
No comments have been added yet.