disable anchor tag css code example

Example 1: how to disable a link

<style>
.isDisabled {
  color: currentColor;
  cursor: not-allowed;
  opacity: 0.5;
  text-decoration: none;
}
</style>
<a class="isDisabled" href="https://unfetteredthoughts.net">Disabled Link</a>

Example 2: disable a tag

.disable{
	pointer-events:none;
}

with jquery add this class to you element to disable is and remove class to enable it

Example 3: html disable anchor link

a.isDisabled {
  pointer-events: none;
}

Example 4: disabled a click

// CSS
.not-active {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
  color: black;
}

// HTML
<a href="link.html" class="not-active">Link</a>

Tags:

Misc Example