Quote:
Originally Posted by VIPStephan
Generally I’m felgall’s opinion that an anchor must work without JavaScript. But sometimes there are cases where we as developers have no choice other than working with what we’ve got. That said, remove the href completely as apparently it serves no purpose anyway. An anchor is valid without href attribute, too.
|
Where it isn't intended to work without JavaScript it generally is better to actually add it to the page using JavaScript so that those without JavaScript don't even see it at all.
Of course if it is for an intranet where everyone is confirmed to have JavaScript then having the tag in the HTML without the href makes sense.
Another alternative is to make it a <span> tag rather than an <a> tag.