Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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!

share|improve this question
1  
The best reason to use hash links is to provide SOME functionality to non-JS browsers. This may require rethinking your approach. –  Blazemonger Apr 16 '13 at 11:48
add comment

2 Answers

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

share|improve this answer
    
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. –  bybe Apr 16 '13 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 Apr 17 '13 at 20:53
add comment

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">

share|improve this answer
    
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 Apr 17 '13 at 20:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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