Ad

Сan I Use The Same Alt Attribute For The Preview And For The Large Product Image?

- 1 answer

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?

Ad

Answer

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.

Ad
source: stackoverflow.com
Ad