Adding alt tags to background images

1 replies
  • SEO
  • |
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.
#adding #alt #background #images #tags
  • Profile picture of the author paulgl
    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.

    been doing to still reek the benefits
    It reeks alright. I assume you mean "reap."

    But, that answers a lot of questions.

    Paul
    Signature

    If you were disappointed in your results today, lower your standards tomorrow.

    {{ DiscussionBoard.errors[11123518].message }}

Trending Topics