I know when using <img>
tag, the alt & title are using for SEO. But is <picture>
tag is better for SEO with the attribute srcset? If yes how?
1 Answer
It won't have a positive effect on your SEO. For search engines, as for screen readers, the alt tag and the on-page caption are the big factors. The <picture>
tag is more of a developer technique rather than an SEO technique. It is no more semantic than the <img>
tag, since crawlers know that both represent an image. Furthermore, the last child of the <picture>
tag is the <img>
tag, to provide a fallback. Your <img>
tag should still contain the alt text. The search engines will still find it.
This post, from this very message board, is worth looking at:
Does Google index images declared using 'srcset'?
Thus, it is particularly important to include that fallback <img>
tag, with your preferred image, when using <picture>
in your code.