Adding alt tags to background images

by 1 replies
4
Hello,

I have been implementing images as background-images lately. I feel it offers more flexibility in design. However, this limits the opportunity for the alt tag for the image, so what I have been doing to still reek the benefits of the tag is something like:

<div id="background-img">
<img src="" alt="description" class="hidden">
</div>

Do search engines frown on this method? If so, what other way can I add an alt tag to a background-image?


Thanks.
#search engine optimization #adding #alt #background #images #tags
  • Banned
    [DELETED]
  • Even if you do it, an alt for a background image will be ignored.

    You can do any line you want, actually, and if it makes no sense, browsers will ignore it.

    Sure, it's in the raw code, but being raw does not mean jack either.

    You are mixing a lot of stuff up, trying to shmooze google with a bunch of meaningless BS.

    A background image is just that. It has no meaning to awebsite, html-wise.

    If an image has meaning, then you use a regular <img>.

    You cannot mix it up and think it will do something other than be ignored.

    It reeks alright. I assume you mean "reap."

    But, that answers a lot of questions.

    Paul

Next Topics on Trending Feed

  • 4

    Hello, I have been implementing images as background-images lately. I feel it offers more flexibility in design. However, this limits the opportunity for the alt tag for the image, so what I have been doing to still reek the benefits of the tag is something like: