0

I am looking to use an image as a link but still want to pass the best description through the link to the next page.

<a href="#"><img src="#" alt="Floating red balloon"></a>

VS

<a href="#"><img src="#" alt="Floating red balloon" title="Red balloon"></a>

Which one would work best for SEO and passing a better description to the next page?


Or would it be better to have the title on the anchor tag?

Or should I have page text along with the image but hide that using a span?

For example:

<a href="#"> <img src="#" alt="Floating red balloon"> <span class="display-none">Red balloon</span> </a>

Thank you for your help :)

1

The image tag doesn't have a title attribute, so you won't be able to use that. You also shouldn't be doing the option, because the alt tag will already show when the image can't be loaded. To inform Google about the image, you should be using the alt attribute. It's also good to have a good url to the image itself (as in the file name).

Edit: I was wrong about not being able to use the title attribute. Though it's an optional attribute. I think this quote from yoast.com describes it best:

If the information conveyed by the title attribute is relevant, consider making it available somewhere else, in plain text and if it’s not relevant, consider removing the title attribute entirely.

  • What's strange is that there are places that say you can use a title attribute: yoast.com/image-seo-alt-tag-and-title-tag-optimization - stackoverflow.com/questions/872389/… - Which is why I wondered if it was better for SEO – Andrew Jun 26 at 21:16
  • You are right, I was wrong in that regards. But still the alt tag should always be added to your image as it works as a fallback and a way for screen readers to read your images. You can find some more info here: w3.org/TR/WCAG20-TECHS/H37.html. The title tag is optional and I am not quite sure if google actually uses it. But I think this text on yoast.com describes it quite good: If the information conveyed by the title attribute is relevant, consider making it available somewhere else, in plain text and if it’s not relevant, consider removing the title attribute entirely. – patrick Jun 27 at 8:17
  • The alt attribute is required so there is no discussion about its usage. – Rob Jun 27 at 12:14
0

If you put the title on the anchor tag then you are saying the title of the anchor is Red Balloon but it's the image that is of a red balloon, not the anchor.

  • But which will pass the best link information through to the next page. That is the question – Andrew Jun 27 at 15:00
  • @Andrew Neither and no information will be passed to the next page because of them. That's not what they do. – Rob Jun 27 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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