css disabled a tag code example

Example 1: css disabled div

.disabledbutton {
    pointer-events: none;
    opacity: 0.4;
}

Example 2: 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 3: html disable anchor link

a.isDisabled {
  pointer-events: none;
}

Example 4: css disabled

<input type="text" name="username" value="admin" >

<style type="text/css">
input[name=username] {
    pointer-events: none;
 }
</style>

Tags:

Misc Example