Is 'disabled' a valid attribute for an anchor tag

If you don't want to use javascript to disable the anchor (as pruposed in other responses) you can just omit the hrefattribute and the anchor wont work and will even change it's styling.

<a>A disabled anchor</a>

Note: I know my answer doesn't directly talk about the disable attribute but the info might still be useful for the audiance, as it was for me.


Disabled is not a valid attribute for the anchor tag. Source : http://dev.w3.org/html5/html-author/#the-a-element


Read w3c Link and the-a-element

disable is not valid with anchor tags

instead you can do it by event.preventDefault()

$('a').click(function(event){
   event.preventDefault();
});

no it doesnt work with the a tag you can use the jquery event.preventDefault() referance here

Tags:

Html

Angularjs