html – <a>Can</a> &quot; <a>&quot;</a> tag <a>be used without the &quot;href&quot;?</a>


Are there any restrictions or problems in using the tag a without the attribute href ?

Example: <a>teste</a> .


In HTML5 it is valid and can be used to later be completed by a script , as indicated in the official documentation . Something like:

document.getElementById("link").href = "";
<a id="link">Vai ter um link aqui</a>

I put it on GitHub for future reference .

Scroll to Top