Although that link is disabled, it’s still clickable.

<a href="https://stackoverflow.com/" disabled="disabled">123n</a>

Can I make it not-clickable if it’s disabled? Should I use JavaScript necessarily?

33 Answers
33

With the help of css you will disable the hyperlink. Try the below

a.disabled {
  pointer-events: none;
  cursor: default;
}
<a href="https://stackoverflow.com/questions/13955667/link.html" class="disabled">Link</a>

Leave a Reply

Your email address will not be published. Required fields are marked *