View Full Version : Is this code Search Engine Friendly?
webbys
08-02-2007, 09:33 AM
Hey I was wondering if anyone knew if this linking was SEO friendly, its worked on all the spider tools i've used but I just wanted to verify:
<img border="0" onclick="document.location.href='/destinations/default.aspx';" onmouseout="removeselect('visible')" onmouseover="this.style.cursor='pointer';dropdownmenu(this, event, 'anylinkmenu1')" src="/images/home_nav.gif" width="152" height="64" />
Thanks
Googlebot follows HREF links and SRC links so, you should be OK!
Jazajay
08-03-2007, 10:01 PM
HI
It should be alright but one thing I would do is move some of the style to css to cut down on code bloat. I take it this is part of your top navigation. So there will be more img requirung the same code if so use a class if not replace the class with an id.
ie: in body.
<img class="top-nav"onclick="document.location.href='/destinations/default.aspx';" onmouseout="removeselect('visible')" onmouseover="dropdownm enu(this, event, 'anylinkmenu1')" src="/images/home_nav.gif" width="152" height="64" />
then in you css.
.top-nav a {border: 0px;} or .top-nav a {border: #FFF;} Same thing but turns the border white (if your background is white it wont show up)
.top-nav a:hover {cursor: pointer}
this is only a little thing but it will help reduce code bloat which will help increase keyword relavance.
SanDiegoSEO
08-09-2007, 04:18 PM
The spiders wont follow the link in the onclick attribute.
The spiders wont follow the link in the onclick attribute.
Great catch SanDiegoSEO, I didn't see the "." before the href.
You need to use something more like <a href=”page.html” onClick=”myfunction();”>anchor text</a> even href=..... Point being the href is not part of the "function".
Also, it may be a good idea to add some ALT text to your image.
Jazajay
08-09-2007, 05:02 PM
Your not the only one beu. To correct my first answer no it's not SE frindly, sorry for the bad answer.
webbys
08-09-2007, 05:15 PM
Thank you all for your help!
SanDiegoSEO
08-09-2007, 05:26 PM
It's ok, we all miss something every now and then.
;)
Jazajay
08-09-2007, 06:27 PM
So true but thats why we have experts like you to fall back on :D
Yeah, guess I need to dust of the screen! Sorry for any confusion.:o