An SEO professional asked John Mueller about images as anchor text, during the submitted Question and Answer segment of his hangout.
Their question is: if an HREF tag contains both text and an image, which one helps Google to better understand what the link page is about: the alt text of the image or the visible anchor text?
Does the order in which they occur within the tag also play a role?
John answered that they would likely not find much value in an image as anchor text. If you have alternative text associated with the image, then they would treat that essentially the same as any anchor text that they have associated with the link directly.
From their perspective, the alt text would be converted into text on the page and be treated in the same way.
So, it’s not that one or the other would have more value or not. They are essentially equivalent on Google’s side, and the order doesn’t matter as much.
John doesn’t think it matters at all – it’s really just both on the page. However, one thing he would not do is, purely for usability reasons, just say “Oh, well if the visible text doesn’t matter as much or it’s the same as an alt text, I’ll just remove the visible text.”
The reasoning behind this is because other search engines might not see it that way. And it may also be for accessibility reasons that it actually makes sense to include visible text.
John wouldn’t just blindly remove it to a minimum, but rather he would at least want the SEO professional to know that they are not losing anything by having both of these there.
This happens at approximately the 40:32 mark in the video.
John Mueller Hangout Transcript
John (Submitted Question) 40:32
If an href tag contains both a text and an image, which one helps Google to better understand what the link page is about–the alt text of the image or the visible anchor text? Does the order in which they occur within the tag also play a role?
John (Answer) 40:48
So with regards to an image itself, we would probably not find a lot of value in that as an anchor text. If you have an alt text associated with the image, then we would treat that essentially the same as any anchor text that you have associated with the link directly.
So from our point of view, the alt text would essentially be converted into a text on the page and be treated in the same way. So it’s not that one or the other would have more value or not. They’re essentially equivalent from our side. The order doesn’t matter as much. I don’t think it matters at all. It’s essentially just both on the page.
However, one thing I would not do is, purely for usability reasons, just say, Oh, well, if the visible text doesn’t matter as much, or is the same as an alt text, I’ll just remove the visible text. Because especially other search engines might not see it that way.
And it might also be for accessibility reasons that it actually makes sense to have a visible text as well. So I wouldn’t just like blindly remove it to a minimum, but rather kind of at least know that you’re not losing anything by having both of those there.