This question already has an answer here:
I'm asking this because I have some links that act like buttons that pull out content trough ajax, so I don't need any href on them.
(I'm asking this from the SEO perspective)
This question already has an answer here:
I'm asking this because I have some links that act like buttons that pull out content trough ajax, so I don't need any href on them.
(I'm asking this from the SEO perspective)
I am assuming that by "links" you simply mean
a
elements. If that's true then:No. At least, not in the HTML5 draft specification:
From the HTML 4.01 specification:
They're not absolutely required, however you should probably put
href="#/"
as the href to make it semantically correct. Without anhref=""
attribute, the anchor is likely to be parsed as a bookmark in the page, especially if thename=""
attribute is specified.Yes. Anchors without href attributes are not links.
If you are doing that, then do it right. Use Unobtrusive JavaScript and pushState.
"Links" that only work if you are using a pointing device and have JS turned on are not good links.
Search engines won't execute your JavaScript, so the pseudo-links (which depend on JS) are just black holes of nothingness as far as they are concerned).
If you have links that act like buttons, you should probably have used a
<button>
element.no it's not. But links may render different (underline and color) if the href is not set.
I'm not sure, but some time ago I had a problems with "a" without href...the clicks just didn't work. But maybe it was just an old browser.