Submitting the current webpage to a bookmarking site I would like to hear your feedback on the link below that lets users add a link to a website. I read that javascript:void(0) is suggested instead of a # for the &lt;a href="" attribute. Is this still the best practice?

&lt;a href="javascript:void(0)" onclick="window.open('https://www.example.com/add?url='+encodeURIComponent(window.location)+'&amp;text='+encodeURIComponent(document.title))" title="Add link"&gt;Add Link&lt;/a&gt;
First of all, void is an operator, not a function. The parentheses are extraneous; it should be written as void 0.

href="#" should be avoided for the reasons given in the answer you linked; people will forget to cancel the event and the page will jump to the top when users click the link, or worse, if the page uses a base tag, the page will navigate somewhere else.

Most people will tell you to avoid putting JavaScript in tag attributes at all, instead binding events to the element later on, once the page has been loaded, or binding the event to a parent element and delegating.

If you're going to use an inline onclick attribute anyway, and there's nothing appropriate to put in the href attribute, I'd consider not making it a link at all. Make it a button or some other kind of element, possibly styled to look like a hyperlink.

As a final note, GET requests should be safe and idempotent, meaning following a link or visiting a URL should not cause changes on your server / in your database. https://www.example.com/add?... looks suspiciously like it breaks that rule; you may be in a world of trouble if spiders start crawling those links. Making a POST request, for example by submitting a form, would be the proper way to handle this.