How to use the disabled
attribute for a tag in HTML
I have tried this
<a href="#" disabled>
My Link
</a>
How to use the disabled
attribute for a tag in HTML
I have tried this
<a href="#" disabled>
My Link
</a>
a.disabled {
pointer-events: none;
color: #ccc;
}
<a href="www.google.com" class="disabled">Click me</a>
Please check the above code. It may help you out.
There is no disabled attribute like this(<a href="#" disabled>)
for "a" tag. you can try disabling using css so just add class in your "a" tag & then disable using css.
<a href="#" class="disable">
My Link
</a>
.disable {
pointer-events: none;
cursor: default;
}
You can try the code below:-
<style>
.disabled{
/*Disabled link style*/
color:black;
}
</style>
<a class="disabled" href="javascript:void(0)">LINK</a>