JSFiddle - React, Tailwind, and code Playground
HTML
JS 1:
<a href="mylink.html" onclick="return false;">Download</a>
<hr>
JS 2:
<a href="javascript: void(0);">Download</a>
<hr>
Jquery, with multiple links
<a href="mylink.html" class="disabled">Download</a>
<a href="anotherlink.html" class="disabled">Delete</a>
<hr>
Disabled using CSS:
<a href="mylink.html" class="css-disabled">Download</a>
CSS
a.css-disabled { pointer-events: none; }
JavaScript
jQuery(document).ready(function($) {
$('a.disabled').on('click', function(e) {
e.preventDefault();
});
});