Sole hash in anchor href?

Viewed 11822

In the project I work on I've recently moved from developing backend (i.e. non-web) servers to web-related things. In the HTML code I've found the following thing all over the place:

<a href='#'>some link</a>

Then some JS is attached to the click event of <a> element.

Does this sole hash has any special meaning? I understand how the href='#some_id' tells the browser to scroll to element with ID = some_id. But href='#' doesn't work that way, right? If it's all about creating a clickable piece of text, why not simply use a <span>?

5 Answers
Related