Define Semantically
I want to know which form of the following structures is the one that's semantically correct, if I want to use an achor that triggers a javascript callback but doesn't make the window navigate to another place:
The javascript:
window.addEventListener('load', function { document.getElementById('AuxAnchor').addEventListener('click', function(e) { // Do something e.preventDefault; // Don't navigate to anywhere }, false) }, false);
The HTML:
Defined href attribute with blank value:
Defined href attribute with missing in-document ID:
Undefined href attribute:
Note that in the latter (undefined href attribute) I have to simulate an hyperlink appearance by using styles, but that's basically just a cosmetic issue, and it doesn't bother me at all to do so.
You might also like
Metadata and Semantic Research: Third International Conference, MTSR 2009, Milan, Italy, October 1-2, 2009. Proceedings (Communications in Computer and Information Science) Book (Springer) |
Charting the Topic Maps Research and Applications Landscape: First International Workshop on Topic Map Research and Applications, TMRA 2005, Leipzig, ... / Lecture Notes in Artificial Intelligence) Book (Springer)
|
Leveraging the Semantics of Topic Maps: Second International Conference on Topic Maps Research and Applications, TMRA 2006, Leipzig, Germany, October ... / Lecture Notes in Artificial Intelligence) Book (Springer) |
|
Advances in Information Retrieval: 34th European Conference on IR Research, ECIR 2012, Barcelona, Spain, April 1-5, 2012, Proceedings (Lecture Notes ... Applications, incl. Internet/Web, and HCI) Book (Springer)
|