Link to something - at least it should be! It is semantically incorrect to do the following:
<a href="#" onclick="doSomething(); return false;">Do something</a>
This must be replaced with a button, since it is for this purpose - it works as a trigger for what the user (programmer) indicates; therefore, the <button type="button"> element is not clear. On the contrary, the purpose of the link is very clear - it must point somewhere!
Since HTML is a markup language, it doesn't matter what you do if you don't think SEO. You can achieve the same with the <a> tag as you can, with the <button> , for example, <span> can act exactly like <div> - semantically, but this is not true .
source share