Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently linking related and text (caption) in the following way:

<a href="/link"><img src="image.jpg" ... />This is caption</a>

Meaning I combine both and text inside the same tag. Is that the right way to do it, syntax and SEO wise?


share|improve this question
up vote 3 down vote accepted

That's perfectly fine. It's usable, accessible, and (not coincidentally) search engine friendly.

(You might consider using the alt attribute of the image tag to describe the image for users with screen readers or for when the image fails to load. But that doesn't directly affect your question as the caption essentially serves as anchor text for that link).

share|improve this answer

as I know, google loves text links better then image links. But I don't know, what is the case with mixed links like yours, but I would use the background-image CSS property of the A tag instead of using img tag in the link.

This can cause a problem, if you print that page, because background images won't be printed as default.



share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.