I use jQuery, I need to make some anchor tags perform no action.
I usually write it like this:
link
H
This answer should be updated to reflect new web standards (HTML5).
This:
This represents a placeholder hyperlink
... is valid HTML5. The tabindex attribute makes it keyboard focusable like normal hyperlinks. You might as well use the span
element for this as mentioned previously, but I find using the a
element more elegant.
See: https://w3c.github.io/html-reference/a.html
and: https://html.spec.whatwg.org/multipage/links.html#attr-hyperlink-href