Forum Moderators: mack

Message Too Old, No Replies

Alt Text or Link Text, can both be used?

Confused as one is ignoring the other!

         

bid4abook

5:54 am on Jan 23, 2006 (gmt 0)

10+ Year Member



Hello, yet again, I am having trouble getting my head around the difference between Alt and Link text. I have newly inserted the alt text for images into my homepage, however, the link text (cos one of the images is a link) now does not appear whereas the alt text does. Alt or Link, which takes primacy? Or is there a way of having both? Any advice greatly received.

mack

9:45 am on Jan 23, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I would stick with Alt text. You should use alt for all of your images even if the image is a link.

Mack.

tomda

10:55 am on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Had the same problem yesterday.
I was faced with this :
<a href="url" title="TITLE HERE"><img src="URL" alt="TITLE HERE" title="TITLE HERE"></a>

and decided to remain with the title in the link because I thought it was the most important
<a href="url" title="TITLE HERE"><img src="URL" alt="" title=""></a>

It seems that my assumption was wrong?

bid4abook

11:01 am on Jan 23, 2006 (gmt 0)

10+ Year Member



Mack, thanks for clarifying that. Tomda, I know the feeling! There seems to be a slight problem as well as the link tag is providing error codes when checking it with w3c and others.

sandpetra

11:55 am on Jan 23, 2006 (gmt 0)

10+ Year Member



alt text for images ---- title text for links: easy.

peco

12:42 am on Jan 24, 2006 (gmt 0)

10+ Year Member



alt doesn't display in Firefox!

peco

12:48 am on Jan 24, 2006 (gmt 0)

10+ Year Member



As a hover pop-up I mean.

mack

12:22 am on Jan 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



alt doesn't display in Firefox!

I think that's more design than fault. The alt can be useful to show a tip for example "homepage" immediately lets the user know that clicking the image will take them to the homepage.

But many sites just use "logo" or something similar. Firefox uses alt when an image is missing or fails to load, I think this fall under it's intended use more than the tool tip that IE displays.

Mack.

Barb

3:50 am on Jan 25, 2006 (gmt 0)

10+ Year Member



When you are linking an image, use the "alt" tag. Search engines look for alt tags and that can help in optimization.

Another bonus for the alt tag for linked images is that when, for whatever reason, an image won't load, the alt tag text still displays so that your visitor still gets the information you want to convey. Such as - alt="Click here for more information!" or alt="Our ameoba at stage 2". So, if they can't view the image, they will still know what the image was about.

Offhand, I'm not familiar with the "title" tag, I assume it does the same job as the "alt" tag in relation to Search Engine Optimization.

Anlina

7:56 pm on Jan 25, 2006 (gmt 0)

10+ Year Member



Alt text is required by current w3c standards - pages won't validate without it.

IE kind of encouraged misuse of the alt tag by having it play double duty as a title tag as well... in web standards compliant browsers the alt text is not displayed as a tool tip when hovering over the image - this is the role the title tag plays.

The appear to be very similar but their purpose is fundamentally quite different... ideally, alt text should be used in a way that improves the accessibiliy of the website for people who do not load images or people who use screen readers - so if your image is just decorative and doesn't contribute to the content of the site then you may wish to leave your alt tag blank (alt=""). Title tags are nice to use as a sort of "caption" to perhaps give descriptive information about the image - information that wouldn't be relevant to the content of the site if the image failed to appear.

This is just my inderstanding of how they are supposed to work - I've done a bit of research and I still sometimes find it difficult to make the best use of alt tags. There's a lot of excellent articles out there about proper use of the alt tag to increase accessibility of your site.

peco

8:37 pm on Jan 25, 2006 (gmt 0)

10+ Year Member



I've used alt and title together, to make sure of the tool tip. Is this bad coding?

tomda

6:17 am on Jan 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Same remark than Peco, I have also decided to:
1/ Use both alt and title
2/ Use only alt when image is a link (because title is filled in the <a>)

Although than alt and title have two different functions, I tend to insert the same content in alt and title.

Is it OK/safe to use both?

bid4abook

5:10 am on Jan 27, 2006 (gmt 0)

10+ Year Member



Peco and Tomda, Ditto here! Is it safe to use both or is it deemed as cramming?