You must have something for the href attribute, otherwise the browser will not consider it as a link (for example, make it focal or give it an underline) - why the use of "#" has become common.
In addition, the contents of the event attributes ( onclick , onmouseover , on... ) are already considered as javascript: you do not need to enter it using javascript:
So, given your example, the best way to do this is inline (which is perhaps not the best way), as follows:
<a href="#" onclick="DoSomething(); return false">linky</a>
nickf source share