Search code examples
seoaltimage-optimization

Сan i use the same Alt attribute for the preview and for the large product image?


Can I use the same Alt attribute for the preview and for the large product image? Or is it better to set Alt only for large images?


Solution

  • You should consider when the alt attribute is used. It's not only for SEO, as many people think.

    • It is used when a User Agent cannot display the image, refer to this part of HTML 4 spec

    • It is really useful in the context of WCAG - Web Content Accessibility Guidelines. Please refer to the w3.org documentation for more detail about this topic.

    So, to answer your question - you can use the same alt-text for both images, if they actually contain the same information.