Is there any restriction or problem in using the tag a
without the href
attribute?
Example: <a>teste</a>
.
Is there any restriction or problem in using the tag a
without the href
attribute?
Example: <a>teste</a>
.
HTML5 is valid and can be used to be completed by a script , as indicated in official documentation . Something like this:
document.getElementById("link").href = "http://pt.stackoverflow.com";
<a id="link">Vai ter um link aqui</a>