3
Is there a restriction or problem in using the tag a
without the attribute href
?
Example: <a>teste</a>
.
3
Is there a restriction or problem in using the tag a
without the attribute href
?
Example: <a>teste</a>
.
3
HTML5 is valid and can be used to be completed by a script, as indicated by official documentation. Something like that:
document.getElementById("link").href = "http://answall.com";
<a id="link">Vai ter um link aqui</a>
Browser other questions tagged html html5 semantics
You are not signed in. Login or sign up in order to post.
No, but there will be no functionality, of course you can add functionality later with Javascript.
– Leandro Paiva
What would be the reason to do this and not use another tag?
– Sergio
@Sergio I have a menu q is internal and external. The external uses the traditional navigation with href and the internal loading is via ajax. Since I already have all the css in this menu, I think only to check whether the user is logged in or not and remove the attr href.
– alan