1

For example, jQuery tabs uses a link as each tab, that opens the tabbed content. Or often times developers will use a link as the anchor text for a hover tooltip, even though it doesn't actually link anywhere. Given that the functionality uses javascript, for the most part links aren't needed, however there the most apt markup to describe the purpose. ''

Do links with href="#" effect seo? Should they be avoided? Or do links to the current page be helpful in any ways?

Just to over explain, here's an example of the 2 ways to code it, this time using dhtml rather than javascript.

<a href="#" >Anchor text <span class="tooltip"> This will appear on hover</span></a>

CSS:

.tooltip span{display:none;}
.tooltip:hover span{display:block;}

OR without a link

<div> Anchor text <span class="tooltip"> This is my hover tooltip</span></div>

Same CSS

Thanks for the help!

1
  • 1
    The best reason to use hash links is to provide SOME functionality to non-JS browsers. This may require rethinking your approach. Commented Apr 16, 2013 at 11:48

2 Answers 2

1

Google treats # as a internal on the page link and as far as we know its not harmful though it will be still be considered keyword stuffing if you have the same keyword over and over. 100,000's of sites if not millions of sites use a links for various hover tooltips and other funky JavaScript such as tabs, accordions, sliders etc. So Google will be fully aware of this and will cater for, if it harmed SEO I'd sure we would be aware of it.

Personally I don't believe in using a links when possible afterall technically there not site links, so if possible use:

<div class="hovertip"> Content Here</div>

But also if your a keen markup wizz then you might want to opt to use a HTML5 method which allows for better markup as well as easier use:

<div data-placement="bottom" data-toggle="tooltiphover" data-original-title="description here">

1
  • jQuery uses <a href="tab-id">Tab control</a> for their tabs, but that's a good point. I know penalization isn't an issue, but doesn't increasing the number of links on a page decrease each link's value? Thus the value of important links get diminished?
    – David Hobs
    Commented Apr 17, 2013 at 20:53
1

Anchor links are fine, you definitely won't be penalized for them, and there's no reason to avoid them.

2
  • True for SEO purposes but generally for cleaner code and especially in certain situations in HTML4/XHTML it is best to avoid the use of a links. This is because you always need to ensure that the a tag is wrapped within an element. document type does not allow element "A" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag So depending on your usage can sometimes increase your nesting by one level. HTML5 however, a tag does not need to be wrapped at all. Commented Apr 16, 2013 at 22:04
  • 1
    Doesn't increasing the number of links on a page decrease each link's value? Thus the value of important links get diminished?
    – David Hobs
    Commented Apr 17, 2013 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.