Dynamic Alt Tags on Background Images

I’m looking for a way to add alt tags to background images in a dynamic cms collection. I know I can use custom attributes to do this in non dynamic situations, but I can’t seem to find a way to add them to my dynamic collections.

Background images seem to work so much better for so many design aspects but I’m not apposed to using images if I could achieve the same effect. I just don’t know how to do that either.

Thank you all in advance for the help!

PS. Here is my read only link and a screen shot of the images I’m trying to add alt tags too.
https://preview.webflow.com/preview/ozzykdesigns-test?preview=d63b38621767c1c97d12523c268a818d

Background image do not need alt tags.

In the SEO analyzers I’ve used it recognizes them as images without alt tags which it says is hurting my optimization. Is this important or would you recommend just leaving it be?

3 Likes

Then they should be wrong. Only <img> tags require/support alt attributes. See html - CSS background image alt attribute - Stack Overflow

Use background images when they are just for decoration; use <img> when the image is a part of the content. The on-page content should be all you need for SEO purposes. Don’t try to over-think SEO.

Related:

https://christianheilmann.com/2009/02/25/so-how-do-you-add-alternative-text-to-background-images/

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.