Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

best practice for links

Status
Not open for further replies.

rye8261

Technical User
Jul 6, 2003
359
US
I have been reading and trying to figure out what to do for links and text that go along with them. When I put a link from an image I should use good words that describe the link in the "alt" text correct? What is the best practice for having a text link? Should I have "alt" text or something else?

Thanks for your advice.

---------------------------------------
 
If you're linking from an image, put text in the [tt]alt[/tt] attribute that will act as a suitable alterntative if the image is not displayed. For example, if your image is a fancy graphic with "Buy now!" written on it, mark it up like this:
Code:
<a href="somepage.htm"><img src="buynow.gif" alt="Buy now!" title="" /></a>
There's no SEO benefit to be had from stuffing [tt]alt[/tt] attributes with keywords, and you'll just make the site harder to use for people that can't see images (for whatever reason).

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Nothing particularly special to do with text links:
Code:
<a href="somepage.htm">Some text here</a>
Where possible, the text should be descriptive of the page that it links to - avoid "Click here" links:
Code:
BAD:  <a href="widgets.htm">Click here</a> to visit our Widget department

GOOD: Visit our <a href="widgets.htm">Widget department</a>
This is good for usability, and good SEO too - since the SEs will take (some) notice of the words used to link to a page. See for more.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
We are advised to use title in any links to add extra context for accessibility. Example:
Code:
Visit our <a href="widgets.htm" title="Click here to visit our Widget department pages (local link)">Widget department</a>
Is there any SEO advantages to using the title property?

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Hard to know what impact titles have on SEO. My guess would be "not much". I'm sceptical about any accessibility benefit either - the title doesn't seem to add any particularly useful information, just extra guff for the poor screenreader user to take in:
ImaginaryScreenreader said:
Visit our link widget department title click here to visit our widget department pages local link
I don't have an actual screen reader to run that HTML through, nor any accurate knowledge about how they render links and their titles. However, it seems to me that any attempt to read out that title makes the link less usable. If it doesn't get read out, what's it there for?

Of course, accessibility goes beyond blind users, but I can't think of any group for whom titles of this sort will be an aid to accessibility.

Personally, the only time I add titles to text links is to add additional information. For example, I have a programme of events on one of my sites. Each event has links with the text "Previous Event" and "Next Event". I use titles to give each link a tooltip containing the name of the event to which it links. That's useful extra information.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
I don't have any evidence either way, SEs might read titles, they might not. Whatever they do today might change tomorrow. I don't really care: titles are there for people, not spiders. If the title is helpful to people, include it. If it isn't, don't. I find them irritating more often than not, but YMMV.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thanks for your comments on this, guys. Personally I add the title tag for accessibility compliance rather than SE stuff... but I was interested nonetheless.
If the title is helpful to people, include it. If it isn't, don't.
Perfectly good sense. I follow this reasoning for all sites I am responsible for architecting and coding - unfortunately not all my contracts allow me to be so practical (and as such we end up some really useless title tag contents "beacause the client wants to meet accessibility compliance"). This isn't the place for such a rant about forcing compliance through code, though.

Cheers again,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Way off.

No SE reads title attributes, or if they do read they are not used for ranking purposes. I have a page live on test for title attributes and it isn't found for the made up word in the title attribute.

However regardless of SEO benefits, title attributes are there for a specific purpose and should be used for that purpose.


Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
Thanks for the clarification Chris.

I totally agree that pages should be written for people - not spiders....BUT I am also of the opinion that if an opportunity is there to ethically optimise a page without degrading the user experience then it should be taken.

Tony

Spirax-Sarco - steam traps control valves heat exchangers
Sun Villa - Luxury Florida accommodation
 
I asked a very similar question here in thread828-1127649 where we reached the agreement that using - is preferable to _ (at least for directory name-based websites).

I would go for - if I were you.

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top